[Expat-discuss] Bugs in expat 1.95.8 [WAS: Expat 1.95.8 fails
on XML with newline]
Karl Waclawek
karl at waclawek.net
Tue Dec 14 21:34:20 CET 2004
Enrico Weigelt wrote:
>>>other things like passing common entities as they are.
>>
>>What do you mean?
>
> In some php application I need to get some html entities for
> umlauts as they are, and I was really too lazy writing an extra
> doctype for that.
> (in fact the documents dont have any doctype declaration).
>
> I solved this by simply replacing these entities to some other
> sequences before passing the xml to expat and later converting
> back to htmlentities.
>
> Yes, its a dirty hack but it works. Probably there's a more
> elegant way ...
Have a look at the XML_UseForeignDTD() API.
It allows you to use a DTD with documents that don't have one.
Karl
More information about the Expat-discuss
mailing list