Skip Menu |

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

Report information
The Basics
Id: 46238
Status: resolved
Priority: 0/
Queue: XML-LibXML

People
Owner: Nobody in particular
Requestors: MARKOV [...] cpan.org
Cc: erich.weigand [...] nureg.de
AdminCc:

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



CC: erich.weigand [...] nureg.de
Subject: encoding of ampersant
XML::LibXML very conveniently encodes entities. However, for some reason not for createAttribute(): then it complains with "unterminated entity reference". Using setAttribute() works as expected. Bug or feature? (libxml2 v2.7.1 and 2.7.3) use XML::LibXML; my $doc = XML::LibXML::Document->new; my $elem = $doc->createElement('myelem'); $elem->appendText('c & d'); $elem->setAttribute(myattr => 'a & b'); my $attr = $doc->createAttribute(attr2 => 'e & f'); $elem->addChild($attr); print $elem->toString(1);
Dne st 20.kvě.2009 04:18:37, MARKOV napsal(a): Show quoted text
> > XML::LibXML very conveniently encodes entities. However, for some > reason not for createAttribute(): then it complains
with "unterminated Show quoted text
> entity reference". Using setAttribute() works as expected. > Bug or feature?
Most likely a bug. -- Petr
Dne st 20.kvě.2009 05:11:04, PAJAS napsal(a): Show quoted text
> Dne st 20.kvě.2009 04:18:37, MARKOV napsal(a):
> > > > XML::LibXML very conveniently encodes entities. However, for some > > reason not for createAttribute(): then it complains
> with "unterminated
> > entity reference". Using setAttribute() works as expected. > > Bug or feature?
> > Most likely a bug. >
And now also fixed in the SVN. Thanks for the report. -- Petr