Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^8: XML::LibXML memory leak

by spstansbury (Monk)
on Dec 08, 2010 at 22:35 UTC ( [id://876130]=note: print w/replies, xml ) Need Help??


in reply to Re^7: XML::LibXML memory leak
in thread XML::LibXML memory leak

If I were to use ->findnodes how would I go about just extracting the data?

Replies are listed 'Best First'.
Re^9: XML::LibXML memory leak
by ikegami (Patriarch) on Dec 08, 2010 at 22:53 UTC

    What data do you want to extract from each element? ->textValue?

      I stayed with the XPathContext method ->find and added the ->to_literal;

      $av = $cve_xc->find('cvss:access-vector', $metrics)->to_literal;

      which is working just fine.

      Thank you for the insight into freeing the tree, that was the issue that I just wasn't seeing!

      Scott...

        For my own info, you didn't have to do anything but ->to_literal to avoid the memory usage, right?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-25 14:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found