Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 68355
Status: new
Priority: 0/
Queue: XML-Stream

People
Owner: Nobody in particular
Requestors: jasongross9+bitcard [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 1.23
  • 1.23_04
Fixed in: (no value)



Subject: XML::Stream::XPath fails to correctly find prefixed namespaces
XML::Stream seems to incorrectly deal with namespace prefixes. In particular, calling XPath('*[@xmlns]') on a parsed XML tree with only prefixed namespaces returns an empty list, as demonstrated by the code below. use XML::Stream qw(Node); use Data::Dumper; my $p = XML::Stream::Parser->new(style => "node"); my $node1 = $p->parse("<foo><baz xmlns='qux'/></foo>"); my @path1 = $node1->XPath('*[@xmlns]'); print "node1: " . Dumper($node1); print "path1: " . Dumper(@path1); my $p2 = XML::Stream::Parser->new(style => "node"); my $node2 = $p2->parse("<foo><bar:baz xmlns:bar='qux'/></foo>"); my @path2 = $node2->XPath('*[@xmlns]'); print "node2: " . Dumper($node2); print "path2: " . Dumper(@path2); 1; I'm running perl, v5.10.0 on Linux 2.6.26-2-686-bigmem.