Re: [xml] Entity not defined

Hi Daniel,

Thanks for your help. It works!


On Wed, Apr 23, 2008 at 5:11 PM, Daniel Veillard <veillard redhat com> wrote:
On Wed, Apr 23, 2008 at 05:00:10PM +1000, Jiang Li wrote:
> Hi all,
> I got a problem when I parse an XML document with xmlreader from Libxml2.
> The document's encoding is ISO-8859-1 and contains many entities of Latin
> letters (e.g. &uuml; etc.).
> However, the xmlreader returns errors that these entities are not defined.
> Could
> anyone give me some suggestions? Thanks.

 By defaut libxml2 does not load the DTD where the entities are likely to
be defined (if not it's a fatal error), to do this you need to pass the
XML_PARSE_DTDLOAD option when you create the Reader.


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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