in reply to Re: Searching subtrees with XML::LibXML::XPathContext always searches whole document - why?
in thread Searching subtrees with XML::LibXML::XPathContext always searches whole document - why?

Indeed.
//apps:login

is short for

/descendant::apps:login

Just like with directory paths, expressions starting with "/" start searching at the root. To look for descendants of the topic node, one must use a relative path such as

descendant::apps:login
or
.//apps:login
  • Comment on Re^2: Searching subtrees with XML::LibXML::XPathContext always searches whole document - why?
  • Select or Download Code

Replies are listed 'Best First'.
Re^3: Searching subtrees with XML::LibXML::XPathContext always searches whole document - why?
by nneul (Novice) on Feb 08, 2010 at 16:54 UTC
    Thank you both!!! Knew it had to be something stupid-simple that was wrong with my usage.