Re: [xml] Parse unavailable document

On Mon, Oct 27, 2003 at 01:48:57PM +0100, Manuel González Castro wrote:
I get a :
- NULL doc,
- "ctxt->input" is NULL 
- but "ctxt->lastError->level" is set to "XML_ERR_NONE". 

1) Why "xmlCtxtReadFile" doesn't raise an I/O warning ?

  Well it's a bug, I got a report about it last week and fixed it
in CVS this morning.

2) If "xmlCtxtReadFile" returns a NULL doc and I want to check if the URL is not valid, is enough to check 
if "ctxt->input" is NULL or should I call "xmlLoadExternalEntity" and get the I/O warning to be sure that 
the problem is that?

  Hum, you should not have to do that kind of tricks, really the
fix in 1/ is the proper way to proceed.


Daniel Veillard      | Red Hat Network
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]