Hello Monks
i am a newbie to perl
I have one requirement in which i need to process data from the database and then want to write it in a XML file.
- processed data will be in a data structure (hash ref, array ref etc)
- size of data is hugh
- want the best performamce while writing this data into xml file
- do not want to read this xml file back in a data structure
- As i am creating this application from scratch i can design the structure of my processed data keeping in mind of the good writing performance
- below is an example of the output xml file
Sample output XML file
<EMPLOYEES>
<EMPLOYEE ID="1">
<NAME>John Wright</NAME>
<AGE>45</AGE>
<DEPARTMENT>Sales</DEPARTMENT>
</EMPLOYEE>
<EMPLOYEE ID="2">
<NAME>Peter Rob</NAME>
<AGE>30</AGE>
<DEPARTMENT>HR</DEPARTMENT>
</EMPLOYEE>
</EMPLOYEES>
As there are many XML modules to do this task and need your expert advice for this problem
XML::Simple
XML::Twig
XML::Bare etc
which one to use?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.