Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
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 ( [id://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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2024-04-19 06:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found