How *extract* data from XHTML Transitional web pages? got xml.dom.minidom troubles..
bdesth.quelquechose at free.quelquepart.fr
Sat Mar 3 02:46:57 CET 2007
seberino at spawar.navy.mil a écrit :
> I'm trying to extract some data from an XHTML Transitional web page.
> What is best way to do this?
As a side note, cElementTree is probably a better choice. Or even a
simple SAX parser.
>parseString("text of web page") gives errors about it
> not being well formed XML.
If it's not well-formed XML, most - if not all - XML parsers will shoke
> Do I just need to add something like <?xml ...?> or what?
How could we say without looking at the XML ?
But anyway, even if the XHTML is crappy, BeautifulSoup may do the job...
More information about the Python-list