[Expat-discuss] How to deal with simple entities in external DTD

Christian Renner c.renner at gocomputer.de
Tue Dec 31 12:58:24 EST 2002


Hello everybody,
I started using expat a couple of days ago. Since my XML docs use German
language, there are letters not included in UTF-8 (such as 'ä' etc.). To
handle that, I declared entities in my external dtd.

<!ENTITY auml "somereplacement">

If I parse one of my xml docs with my C Parser using expat, the external dtd
is ignored and my entities as well (as it is described in the expat ref
doc). Fine to this point, since the parser works first of all. But when
parsing, I'd like the parse not to ignore my entities (I know I could use
internal defs but this is not an option, since I have about 20 xml files!).
Thus, I set the ExternalEntityHandler und parse the external entity. But
now, the parsing stops whenever one of my entities is found. Therefore, the
question is, what I have to do to get my external dtd with the entity
definitions work in my xml files when parsing. I hope you can help me out.

Thanks to you all
Christian





More information about the Expat-discuss mailing list