in reply to XML parsing help need, please...

There is no namespace declared, not sure how to handle that...

So the elements belong to the null namespace, which is the one XPath engines (should*) look into for a nodetest with no prefix.

If all the elements are in the null namespace, you may use XPC as you used it

my $xpc = XML::LibXML::XPathContext->new($root); $xpc->findnodes(...) $xpc->findnodes(..., $topic)

or you may avoid using XPC completely.

$root->findnodes(...) $root->findnodes(..., $topic)

* — In practice, many XPath engine get this wrong. LibXML gets it right.

Replies are listed 'Best First'.
Re^2: XML parsing help need, please...
by spstansbury (Monk) on Apr 13, 2010 at 22:17 UTC

    Thanks for pointing out the option - I didn't realize that not using XPC would work