Today, I got an error returned when I was using xmlreader from Libxml2
to parse an XML document, which contains many entities of Latin letters
(e.g. ü,ä, etc.). It reported that these entities are
not defined. I felt confused because a character entity set has been
defined somewhere. What's the problem?
I have to turn to gnome xml mailing list. I got a prompt reply from Daniel Veillard. He suggested me to add XML_PARSE_DTDLOAD option when creating the reader as the default behaviour doesn't load the DTD file. After the option was added, the document got parsed correctly.
I have to turn to gnome xml mailing list. I got a prompt reply from Daniel Veillard. He suggested me to add XML_PARSE_DTDLOAD option when creating the reader as the default behaviour doesn't load the DTD file. After the option was added, the document got parsed correctly.

Leave a comment