[Expat-discuss] Pb with & and & in parsing

Marcin Zdun dino at aiesec.pwr.wroc.pl
Tue May 20 20:59:07 EDT 2003


On Tue, 20 May 2003, Renaud Binse wrote:

> Hi
>
> I have a strange problem with expat and perl. I’m parsing a xml file with
> things like &.  After parsing, they are translated to &.
>
> For example, with <tag1>gfgffghfh &amp; fdsfdsf</tag1> I get gfgffghfh &
> fdsfdsf
>
> And it’s the same problem with quotes
 Is there a way to deactivate that ?
> Or is it an encoding problem ?
>
There is no way of deactivating this, and this is behaviour as in specs
(http://www.w3.org/TR/REC-xml#sec-physical-struct): all recognized
entities are expanded by parser for application. So &amp; becomes &, &lt;
- <, and so on

-- 
d.n.hotch/reloaded:came;revolutions:soon

"Huh, upgrades!"
Thomas Anderson




More information about the Expat-discuss mailing list