Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^6: language selection via libxml

by tangent (Parson)
on Jan 20, 2014 at 13:20 UTC ( [id://1071312]=note: print w/replies, xml ) Need Help??


in reply to Re^5: language selection via libxml
in thread language selection via libxml

Using your example I get:
XPath error : Invalid expression /language/$language/widget[@ID="$id"] ^

Replies are listed 'Best First'.
Re^7: language selection via libxml
by hdb (Monsignor) on Jan 20, 2014 at 13:22 UTC

    I had not seen the variable in between, sorry. You could do

    $result=$tree->findnodes('/language/'.$language.'/widget[@ID="$id"]');
      I added that to the test script I have below but it returned no results.

        And another one missed...

        $result=$tree->findnodes('/language/'.$language.'/widget[@ID="'.$id.'" +]');

Log In?
Username:
Password:

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

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

    No recent polls found