I'm confused as to whether the code you posted is supposed to run as is, because it contains syntactical and more subtle errors. But maybe you want to use XML::Twig. Or maybe you want to be more explicit in as to which part of your code posted is verbatim and which part is more hand wavy, otherwise, we can only give you hand wavy hints, like, "start with a simple XPath query and refine that until it stops working, then take out things until it starts working again", and "Start with a simple XML file".
In reply to Re: First Question
by Corion
in thread [fixed]Interpolation of variable in xpath
by camelmanos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |