Re: DOM and HTML

2006-04-02 Thread Larry Bates
[EMAIL PROTECTED] wrote: > Hi All, > > I am looking for any Python library which can help to get DOM > tree from HTML. Is there any way to access HTML DOM, just like > accessing it using javascript. > > Any kind of help is appreciated. > > Thanks. > R > Since the browser can't execut

Re: DOM and HTML

2006-04-02 Thread Paul Boddie
Larry Bates wrote: > [EMAIL PROTECTED] wrote: > > > > I am looking for any Python library which can help to get DOM > > tree from HTML. Is there any way to access HTML DOM, just like > > accessing it using javascript. [...] > Since the browser can't execute anything except Javascript,

Re: DOM and HTML

2006-04-02 Thread Ant
I've used Beautiful Soup, and it is a very pythonic way of accessing the data in the HTML. It is actually very similar to the way you access the DOM with JS - for example soup.html.body.h1 will give you the first h1 tag. There are also various other ways of searching the HTML in XPathish ways (if

Re: DOM and HTML

2006-04-02 Thread Fredrik Lundh
"Sullivan WxPyQtKinter" wrote: > go ahead to xml.dom.minidom module for help. It has a basic (and great) > implementation for light-weighted DOM implementation. that's a rather unusual way to use words like "great" and "light-weight"... -- http://mail.python.org/mailman/listinfo/python-list

Re: DOM and HTML

2006-04-02 Thread Sullivan WxPyQtKinter
I do not know much about the HTML DOMBut I think if you just mean treating HTML like XML and build it into a DOM tree and (Very important) the HTML file is not a 1 lines or even longer one, then go ahead to xml.dom.minidom module for help. It has a basic (and great) implementation for light