Re: [xml] How to provide the encoding throw the python API
- From: Daniel Veillard <veillard redhat com>
- To: cesar ortiz name
- Cc: xml gnome org
- Subject: Re: [xml] How to provide the encoding throw the python API
- Date: Thu, 9 Feb 2006 06:19:45 -0500
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]