Re: [xml] How to provide the encoding throw the python API

On Thu, Feb 09, 2006 at 12:09:16PM +0100, Cesar Ortiz wrote:
Hi again,

Is it possible to provide the encoding through the python API to the html

  I can't remember, I would have to scan the python bindings to answer.

This question arises because sometimes the html files are xhtml ones, and
the encoding is in a <?xml> tag that the parser ignores.
As the html parser ignores this tag, so I see two possible actions here:

   - Detect that the file is an xhtml one and use the xml parser instead
   the html parser

  that's the proper way. You get XML you should use an XML parser.

   - Detect that the file is an xhtml one and set manually the encoding
   to que html parser (if this is possible)

which option do you think is more suitable?

Thanks, César

xml mailing list, project page
xml gnome org

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]