Re: html DOM

2008-04-06 Thread Stefan Behnel
Sam the Cat wrote: > Is there a package that would allow me the same or similar functionality > for modifying html code via the DOM model as I have in JavaScript ? I'd > like to parse an html file, then modify it and save the result. I am > not trying to do this online, rather I would like to do

Re: html DOM

2008-03-30 Thread Paul Boddie
On 30 Mar, 01:09, "Sam the Cat" <[EMAIL PROTECTED]> wrote: > Is there a package that would allow me the same or similar functionality for > modifying html code via the DOM model as I have in JavaScript ? I'd like to > parse an html file, then modify it and save the result. You could try libxml2do

Re: html DOM

2008-03-29 Thread David
On Sun, Mar 30, 2008 at 1:09 AM, Sam the Cat <[EMAIL PROTECTED]> wrote: > Is there a package that would allow me the same or similar functionality for > modifying html code via the DOM model as I have in JavaScript ? I'd like to > parse an html file, then modify it and save the result. I am not

Re: html DOM

2008-03-29 Thread Gabriel Genellina
En Sun, 30 Mar 2008 00:19:08 -0300, Michael Wieher <[EMAIL PROTECTED]> escribió: > Was this not of any use? > > http://www.boddie.org.uk/python/HTML.html > > I think, since HTML is a sub-set of XML, any XML parser could be adapted > to > do this... That's not true. A perfectly valid HTML docu

Re: html DOM

2008-03-29 Thread Michael Wieher
Was this not of any use? http://www.boddie.org.uk/python/HTML.html I think, since HTML is a sub-set of XML, any XML parser could be adapted to do this... I doubt there's an HTML-specific version, but I would imagine you could wrap any XML parser, or really, create your own that derives from the X

Re: HTML/DOM parser

2006-02-28 Thread Michael Ekstrand
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 a

Re: HTML/DOM parser

2006-02-28 Thread Sybren Stuvel
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 s