is there a module that lets me parse validated html files and store it
as a tree?
for example, i want to be able to easily, say, replace the following
hrpReferences/p
pre
• a href=aa.../a
...
/pre
to
hrpReferences/p
ul
lia href=aa.../a/li
...
/ul
Thanks.
Xah
[EMAIL PROTECTED]
∑
Xah Lee enlightened us with:
is there a module that lets me parse validated html files and store
it as a tree?
http://docs.python.org/lib/module-xml.dom.html
Assuming you're using XHTML.
Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for
On 28 Feb 2006 00:33:11 -0800
Xah Lee [EMAIL PROTECTED] wrote:
is there a module that lets me parse validated html files and store it
as a tree?
BeautifulSoup will parse valid HTML (not just XHTML), and also crummy
HTML while it's at it. And generates a tree structure. Warning: I
haven't