Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: saving sql data in xml formatted file

by kcott (Archbishop)
on Oct 18, 2010 at 23:20 UTC ( [id://866067]=note: print w/replies, xml ) Need Help??


in reply to saving sql data in xml formatted file

The answer rather depends on what XML application you're intending to use.

The process is not particularly dissimilar to what you already have.

You may need something like:

print OUT '<page>'; print OUT '<title>', $objRecordSet->Fields("Titles")->value, '</title> +'; ... print OUT '<view>', $objRecordSet->Fields("Views")->value, '</view>'; print OUT '</page>';

or perhaps:

print OUT '<page '; print OUT 'title="', $objRecordSet->Fields("Titles")->value, '" '; ... print OUT 'view="', $objRecordSet->Fields("Views")->value, '" '; print OUT '/>';

All of that will probably need to be wrapped in a top-level element. Some header information may be required.

-- Ken

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://866067]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2026-01-20 00:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (124 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.