Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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 perusing the Monastery: (12)
As of 2015-07-31 14:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (278 votes), past polls