Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: XML::LibXML out of memory

by choroba (Cardinal)
on Mar 24, 2022 at 12:01 UTC ( [id://11142367]=note: print w/replies, xml ) Need Help??


in reply to Re^2: XML::LibXML out of memory
in thread XML::LibXML out of memory

You can check the nodetype in the condition:
while ($reader->nextPatternMatch($entry_pattern) && $reader->nodeType == XML_READER_TYPE_ELEMENT ) {

or, if more than one termEntry is expected,

while ($reader->nextPatternMatch($entry_pattern)) { if ($reader->nodeType == XML_READER_TYPE_ELEMENT) { ...

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^4: XML::LibXML out of memory
by Anonymous Monk on Mar 24, 2022 at 13:49 UTC

    Thanks.

    I got round the problem with

    next if $reader->nodeType != XML_READER_TYPE_ELEMENT;

    As recommended to me.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11142367]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2024-04-25 16:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found