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
parser?

  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  http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml


-- 
Daniel Veillard      | Red Hat http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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