Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 chanting in the Monastery: (9)
As of 2014-09-20 08:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (157 votes), past polls