Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 romping around the Monastery: (7)
As of 2014-11-25 23:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (160 votes), past polls