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?