Hi monks,

We are in maintaining a existing application which uses XML::Simple to parse xml data. As the input xml data size has grown big in size, we are looking for some module to process data in batches. ie., the current xml file size is 50MB. We want to process data not more than 5 or 10MB at a time.

A outline of what the application does,
* receives XML content via HTTPResponse.
* Converts it into hash using XML::Simple
* Calls the appropriate method, to process the data based on first tag. And the hashed xml data is passed to that method. ie.,

if xml data is <tag1 ..> .... </tag1> process1($hashed_xml_data) if xml data is <tag2 ..> ... </tag2> process2($hashed_xml_data)
My friend suggests me XML::Twig. I know only a little about XML::TWig and as far as i know, we need to define every tags and it would give me quite a lot of code changes. Can any one help us with example of how this can be worked out.

Thanks in advance,

ArunV


In reply to XML::Simple to XML::Twig by arunvelusamy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.