rebugger has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I'm a module novice, for the most part. I'm looking through the plethora of XML modules on CPAN, and thought I might see if anyone had suggestions. I need a module for building XML files from scratch. It (probably) doesn't need to read or modify existing XML files. My input is flat text files, and my program will only read them, build some kind of data structure, and output 1 largish (~5-10MB) XML file. I am looking for a module where building the XML data structure is as headache-free as possible, and of course one that can handle the file size (if that is even an issue at this size). Any recommendations are appreciated, and meanwhile I'll keep looking through CPAN. Thanks.
~rebugger~
*Edit: Thanks everyone for your suggestions. I'm checking them all out. I'll add a little extra information to the mix so people still wanting to add anything don't have to do as much of the "if this is what you want, then..." game. The XML has to be a certain format. I have a fixed DTD file I need to conform to (no XSL unless I write one, and it'd probably only be used in my program). The XML is the input for catalog software. Order of elements is important (it is kind of HTML-like) so I don't want it re-sorting. I am taking CSV files containing product data and building them into a catalog. This only needs to be done once, as it will be loaded into our catalog software database and edited in the software. The only data is text and numeric, nothing binary or otherwise fancy.
Ex. XML:
<catalog media_no="123456AB"> <title>Tool Catalog</title> <section id="s1000001" sort="1000001"> <title>Section 1</title> <section id="s0000001" sort="1"> <title>Hoses</title> <article id="a6543210"> <title_1>Air Hose</title_1> <title_info_1>Warranty: Nine Months</title_info_1> <list style="bulleted"> <title>Air Hose</title> <list_item>Rugged bend restrictor</list_item> <list_item>Max working pressure: 350 PSI</list_item> </list> </article> </section> </section> </catalog>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Module for XML output
by Lotus1 (Vicar) on Jan 10, 2012 at 18:41 UTC | |
|
Re: Module for XML output
by Jenda (Abbot) on Jan 10, 2012 at 19:48 UTC | |
|
Re: Module for XML output
by saberworks (Curate) on Jan 10, 2012 at 20:19 UTC | |
|
Re: Module for XML output
by tobyink (Canon) on Jan 10, 2012 at 21:04 UTC | |
|
Re: Module for XML output
by ambrus (Abbot) on Jan 11, 2012 at 14:08 UTC | |
by locked_user sundialsvc4 (Abbot) on Jan 11, 2012 at 15:50 UTC | |
|
Re: Module for XML output
by locked_user sundialsvc4 (Abbot) on Jan 10, 2012 at 19:49 UTC |