Skip Menu |

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

Report information
The Basics
Id: 14130
Status: new
Priority: 0/
Queue: XML-EasyOBJ

People
Owner: Nobody in particular
Requestors: tmb [...] ecs.soton.ac.uk
Cc:
AdminCc:

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



Subject: getString/extractText ignore entity references
The extractText method ignores entity references when concat'ing child nodes. use XML::EasyOBJ; $xml = <<XML; <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <person><name>John Rodr&iacute;guez</name></person> XML $doc = new XML::EasyOBJ(-type=>'string', -param=>$xml); print $doc->name->getString(), "\n"; $ perl test-entities.pl John Rodrguez
--- XML/EasyOBJ.pm.old 2005-08-11 22:56:12.000000000 +0100 +++ XML/EasyOBJ.pm 2005-08-11 22:33:44.000000000 +0100 @@ -366,6 +366,9 @@ if ( $n->getNodeType == TEXT_NODE ) { $text = $n->toString; } + elsif ( $n->getNodeType == ENTITY_REFERENCE_NODE ) { + $text = $n->toString; + } elsif ( $n->getNodeType == ELEMENT_NODE ) { foreach my $c ( $n->getChildNodes ) { $text .= &{$INTSUBLIST{extractText}}( $c );