[xml] DAV: namespace and xmlReader


I am trying to parse WebDAV messages like the person below, and running into the same problem. The xmlReader in the latest version of libxml2 (.17) will not parse this -- it gives warning 99 (invalid namespace DAV:), and won't return the propfind element with xmlTextReaderConstLocalName. I've tried xmlSetPedanticParserDefault(0) and xmlResetLastError() to get around the warning, to no avail.

libxml2 .10 doesn't trip on this, so we've reverted for now. I would like to stay current with libxml2 fixes, though.

Is there any way to get around this?



Re: [xml] DAV parsing

    * From: Daniel Veillard <veillard redhat com>
    * To: Tobias Bengtsson <tobbe nbsp se>
    * Cc: gnome xml list <xml gnome org>
    * Subject: Re: [xml] DAV parsing
    * Date: Mon, 4 Mar 2002 09:54:06 -0500

On Mon, Mar 04, 2002 at 03:15:45PM +0100, Tobias Bengtsson wrote:
> Hi!
> I'm trying to implement a webdav server using libxml, but I have problems
> parsing the data I get from the client.
> here it is:
> <?xml version="1.0" encoding="utf-8"?>
> <propfind xmlns="DAV:"><prop>
> <getcontentlength xmlns="DAV:"/>
> <getlastmodified xmlns="DAV:"/>
> <displayname xmlns="DAV:"/>
> <executable xmlns="http://apache.org/dav/props/"/>
> <resourcetype xmlns="DAV:"/>
> </prop></propfind>
> the namespace contains the URI DAV: which libxml consider invalid.
> Can I turn off validation? or define this namespace somehow?
> what is the proper solution?

  Yup, it's a pretty bad namespace name. Is that really what WebDAV uses
nowadays ???

Anyway it's just a warning you can ignore it in various ways,
  should do it for example,


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