Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: XPath with node names and attributes...

by thunders (Priest)
on Oct 20, 2009 at 17:04 UTC ( #802267=note: print w/ replies, xml ) Need Help??


in reply to Re^2: XPath with node names and attributes...
in thread XPath with node names and attributes...

Didn't have a chance to test your example, but I think this is the problem:

$rule_source = "head/node1@attr1";

Perl thinks you want to insert the contents of an array called @attr1 into the string because you used double quotes. Since there is no such array your $rule_source ends up with just "head/node1". Either escape the '@' or use a single quoted string as in the examples below:

$rule_source = "head/node1\@attr1"; # or $rule_source = 'head/node1@attr1';


Comment on Re^3: XPath with node names and attributes...
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://802267]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2015-07-04 02:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls