Hi,
I am trying to select all nodes of all types:
$doc->findnodes("//node() | //@*");
This throws warnings like:
Use of uninitialized value in numeric eq (==) at XML/DOM/XPath.pm line 110.
The problem occurs because in XPath.pm, cmp() is called to compare an element with its own attribute. For example, if the document contains
<elm id="3" />
then the XPath above results in comparing the element "elm" with the attribute "elm/@id". For some reason, "elm" is not an ancestor of "elm/@id", so we proceed to compare their full ancestry, which results in the warning above.
Is this behaviour expected? Perhaps cmp() should behave somewhat nicer for this case.
Sam