W3C home > Mailing lists > Public > www-lib@w3.org > October to December 2002

Re: expat and leading white spaces

From: James Avery <avery@uptimecompany.com>
Date: Mon, 7 Oct 2002 11:31:00 -0400 (EDT)
To: "Sinha, Raj (Raj)" <rajsinha@avaya.com>
Cc: www-lib@w3.org
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
Received on Monday, 7 October 2002 11:57:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:42 GMT