[xml] SAX and escaped characters



Hi,

I'm using the SAX-interface of libxml2-2.4.22. If I'm parsing the following XML-File:

<?xml version="1.0" encoding="iso-8859-1"?>
<doc>
  <message attr1="hello" attr2="world &amp;!&amp;">hello world</message>
  <epilogue>&amp;ciao&amp;</epilogue>
</doc>

I get "&ciao&" for the element, but "world &amp;!&amp;" for the attribute from the parser. Why is the &amp; decoded for the element but not for the attribute? Is this a bug, or a feature?

Ciao,
....................................................................
Marc Ewert                neofonie GmbH        Tel: +49.30.24627-241
Projektleitung            Robert-Koch-Platz 4  FAX: +49.30.24627-120
ewert neofonie de         D-10115 Berlin       Web: www.neofonie.de




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]