Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Namespaced XML::LibXML XPath query (not a bug)

by Aristotle (Chancellor)
on Feb 20, 2006 at 00:53 UTC ( #531313=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $xc = XML::LibXML::XPathContext->new( $doc->documentElement() );
    $xc->registerNs( foobar => 'http://tempuri.org/sdnList.xsd' );
    my $result = $xc->findvalue( '//foobar:lastName' );
    
  2. or download this
    <camel:sdnList xmlns:camel="http://tempuri.org/sdnList.xsd">
      <camel:sdnEntry>
        <camel:lastName>Hello world!</camel:lastName>
      </camel:sdnEntry>
    </camel:sdnList>
    
  3. or download this
    <camel:sdnList xmlns:camel="http://tempuri.org/sdnList.xsd">
      <penguin:sdnEntry xmlns:penguin="http://tempuri.org/sdnList.xsd">
        <camel:lastName>Hello world!</camel:lastName>
      </penguin:sdnEntry>
    </camel:sdnList>
    
  4. or download this
    <sdnList xmlns="http://tempuri.org/sdnList.xsd">
      <penguin:sdnEntry xmlns:penguin="http://tempuri.org/sdnList.xsd">
        <lastName>Hello world!</lastName>
      </penguin:sdnEntry>
    </sdnList>
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2014-09-19 06:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (132 votes), past polls