xmltwig icon indicating copy to clipboard operation
xmltwig copied to clipboard

implement `getNamespaces` in XML::Twig::XPath::Elt

Open garfieldnate opened this issue 11 years ago • 0 comments

Here's a little script that dies:

use XML::Twig::XPath;
XML::Twig::XPath->new()->
    parse('<xml xmlns:foo="www.bar.com"/>')->
    findnodes('//namespace::*');

The error printed is:

axis axis_namespace not implemented [Can't locate object method "getNamespaces" via package "XML::Twig::XPath::Elt" at C:/strawberry/perl/site/lib/XML/XPath/Step.pm line 301.]

XML::Twig::XPath::Elt has a getNamespace method, but no getNamespaces method, which is apparently required in this case via XML::XPath::Step line 173.

garfieldnate avatar Jul 04 '13 20:07 garfieldnate