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.'" +]');