Skip Menu |

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

Report information
The Basics
Id: 60867
Status: new
Priority: 0/
Queue: XML-SimpleObject

People
Owner: Nobody in particular
Requestors: andrew [...] aratika.co.nz
Cc:
AdminCc:

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



Subject: XML::SimpleObject $xmlobj -> children ("name") will always retun at least 1 element
Date: Mon, 30 Aug 2010 12:20:15 +1200
To: <bug-XML-SimpleObject [...] rt.cpan.org>
From: "Andrew McLaren" <andrew [...] aratika.co.nz>
Perl 5.8.8 XML::SimpleObject 0.53 OS Windows XP The "children" method will always return at least a single element even if the given name does not exist in the XML. $xml = "<name></name>"; $xmlobj = XML::SimpleObject -> new (XML => $xml); foreach $subelement ($xmlobj -> children ("some-nonexistant-element")) { # should never reach here, but it does! } Regards Andrew