Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
G'day anadem, You appear to have gotten close. You give the impression that you were just trying all the variations you could think of: one more and you probably would have been there. However, that's not a very efficient way to code: it's better to understand what you're doing than continually throwing pieces of code at a problem until one of them turns out to be right. Here's the latest "W3C XPath" documentation. The "Path Expressions" section has full details but I usually find that just the "Abbreviated Syntax" subsection suffices in most cases. In your first code fragment you needed this path for findnodes():
Had you done that, I believe you would have got what you wanted. All of your attempts had either the findnodes() or the findvalue() path right but the other one wrong. The XML::LibXML documentation should help you with your outstanding tasks. -- Ken In reply to Re: xpath problem using XML::LibXML
by kcott
|
|