Skip Menu |

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

Report information
The Basics
Id: 50890
Status: new
Priority: 0/
Queue: XML-DOM-Lite

People
Owner: Nobody in particular
Requestors: michael.foerderer [...] gmx.de
Cc:
AdminCc:

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



Subject: getElementById does not work on empty elements.
Date: Tue, 27 Oct 2009 20:36:21 +0100
To: bug-xml-dom-lite [...] rt.cpan.org
From: Michael Förderer <michael.foerderer [...] gmx.de>
Hello, i have an Element: <dummy id="xy" /> and the call of getElementById( 'xy' ) doesn?t work. The error is in Parser.pm: # deal with XML style empty tags if ($elmnt =~ /\/$/) { $node = $self->_handle_element_node_end($elmnt); } if (defined $node->getAttribute('id')) { $self->{document}->setElementById($node->getAttribute("id"), $node); } The test of the Attribute 'id' must be done before the handling of empty nodes. regard Michael