Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by thunders (Priest)
on Oct 20, 2009 at 17:04 UTC ( [id://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';

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-20 02:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found