Skip to content
Browse files

Patch to fix wrong node selected by accessors

Changed getlist() from using nodelist() to childlist(). nodelist()
does a depth first search, which results in wrong nodes being selected
when a source element comes before certain other elements in the
document order. childlist() only searches direct descendents. Test
suite still passes, and I cannot think of any element accessors that
this change would adversely affect.
  • Loading branch information...
1 parent 61a485c commit 8f4fb6d86d0359ab4c601822cff068c8dee55250 @veselosky veselosky committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/XML/Atom/
2 lib/XML/Atom/
@@ -84,7 +84,7 @@ sub getlist {
my $obj = shift;
my($ns, $name) = @_;
my $ns_uri = ref($ns) eq 'XML::Atom::Namespace' ? $ns->{uri} : $ns;
- my @node = nodelist($obj->elem, $ns_uri, $name);
+ my @node = childlist($obj->elem, $ns_uri, $name);
return map {
my $val = LIBXML ? $_->textContent : $_->string_value;
if ($] >= 5.008) {

0 comments on commit 8f4fb6d

Please sign in to comment.
Something went wrong with that request. Please try again.