Feb 10, 2017, 10:16 AM
Post #2 of 4
I'm not sure exactly what you mean by the entire XML payload.
Re: [the_r] Extract Entire XML Payload Based On Child Node
[In reply to]
Don't try to parse XML yourself. You should probably use parsers. There two kinds of parsers for XML: DOM and SAX. DOM loads the entire file in memory, so that SAX is probably better if your files are huge and may lead to memory overflow.
You should use CPAN Perl modules implementing either DOM or SAX.
Possible solutions in Perl: XML::XPath, XML::DOM, XML::SAX, XML::LibXML (recommended), XML::Twig (recommended), and many others. Just search the CPAN (http://www.cpan.org/).
Note that XML::Simple is not recommended.
Update: I had to post what I had written in emergency, but it was incomplete. I have now added what I had no time to write earlier.
(This post was edited by Laurent_R on Feb 10, 2017, 12:57 PM)