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

Ah oops, I thought you were using ->findnodes.

The only possible things that could match are: 0 elements, 1 element, or multiple elements. I never use ->find, so I don't know what it returns in each of those circumstances, and whether any of those are connected to the document.

Replies are listed 'Best First'.
Re^8: XML::LibXML memory leak
by spstansbury (Monk) on Dec 08, 2010 at 22:35 UTC

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

      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...