Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

How to write an xpath query including attributes for an XML with namespace

by topola1882 (Initiate)
on Sep 06, 2013 at 12:42 UTC ( #1052705=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    <?xml version="1.0" encoding="UTF-8"?>
    <guestbook xmlns="http://myweb.com" xmlns:xs="http://www.w3.org/2001/X
    +MLSchema-instance" nome="740" xs:schemaLocation="http://myweb.com gue
    +stbook.xsd">
    ...
       <guest>...</guest>
    </comment>
    </guestbook>
    
  2. or download this
    #!/usr/bin/perl
    
    ...
    my $commento = $root->findnodes("$nodetobefound") || die("dead3");
    
    print $commento->get_node(0)->toString();
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2014-10-02 10:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (52 votes), past polls