Skip Menu |
 

This queue is for tickets about the XML-LibXML CPAN distribution.

Report information
The Basics
Id: 121962
Status: new
Priority: 0/
Queue: XML-LibXML

People
Owner: Nobody in particular
Requestors: jidanni [...] jidanni.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 2.0128
Fixed in: (no value)



Subject: Mention registerNs is needed on every level
Download (untitled) / with headers
text/plain 607b
On XML::LibXML::Node there is a "NOTE ON NAMESPACES AND XPATH". In it a better example would: 1. Show registerNs is needed every level, not just once. 2. Stretch all the way back to when we loaded the file. my $doc = XML::LibXML->load_xml(...); my $xc = XML::LibXML::XPathContext->new($doc); $xc->registerNs( 'g', 'http://www.topografix.com/GPX/1/1' ); for ( $xc->findnodes('/g:gpx/g:wpt') ) { my $xc2 = XML::LibXML::XPathContext->new($_); $xc2->registerNs( 'g', 'http://www.topografix.com/GPX/1/1' ); for ('name') { my $p = $xc2->findvalue("g:$_"); ...
From: jidanni [...] jidanni.org
Or my $p = $xc2->findvalue("g:name"); ...


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.