Re: expat and leading white spaces

James Avery <[email protected]>
Newsgroups gmane.comp.lib.libwww
Message-ID <20021007172620.S85965-100000@localhost>



On Mon, 7 Oct 2002, Sinha, Raj (Raj) wrote:

>
> I was looking around to see if there might be a way to allow
> expat/libwww to accept xml files with leading white spaces before the
> standard <?xml version="1.0" ?> line without invoking the
> XML_ERROR_MISPLACED_XML_PI.
>
> I know that it is invalid to do so but this is one of those quirky
> requests to make the parser less forgiving for this case.

I've found the same thing, and work around it by simply seeking to the
first '<' before parsing the buffer or file, which ever is appropriate.

-- 
James Avery
Uptime Company Ltd.
Tel: +45 2121 7569
http://www.uptimecompany.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.