Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Saqib Ali
January 10, 2011, 10:50 pm
rate this thread
I'm reading a large (57 MB) XML file Using XML::XPath::XMLParser()
I keep getting this error:
"Callback called exit at XML/XPath/Node/Element.pm at line 144 during
I'm using Windows XP. So I watched the task-management memory meter
during the execution of this process. The PERL process chewed up a lot
of the "available memory". But when the process died, it still showed
about 216MB available memory.
Is there anything I can do to work-around this problem? From reading
responses to other similar questions, the only option may be to use a
XML stream parser instead of one that builds the entire DOM tree
Re: How to avoid Out of Memory Errors when dealing with a large XML file?
Firstly, as someone or something has inflicted Windows on you, are you
using Strawberry Perl like every sane Windows user (bit of an oxymoron,
that)? Second, calling it "PERL" makes you look either ignorant or
trollish, so don't do that. :)
Yes, you'll want a SAX parser. Strawberry Perl ships with XML::LibXML,
which provides a SAX interface via XML::LibXML::SAX.
Thanks and best regards,
- » FAQ 4.57 What happens if I add or remove keys from a hash while iterating over it?
- — Previous thread in » PERL Discussions