Re: [xml] Problem parsing with python?

On Fri, Dec 09, 2005 at 09:18:54PM -0500, Jim wrote:
I am processin an xml file wil python ... i think there maybe is a bug
in the library ... but i am not a xml spec guru ...

The file I am processing is basically:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<!--some html code-->

The leading line before "<?xml ..." seems to cause problems.

"parser error : XML declaration allowed only at the start of the

  and the parser is right, it's not XML if you have leading spaces
before the XMLDecl. Not XML means it won't go though an XML parser
without a fatal error. Feature, not a bug !


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