Re: Get html DOM tree by only basic builtin moudles

2015-06-05 Thread Wesley
> On Fri, Jun 5, 2015 at 12:10 PM, Wesley wrote: > > Hi Laura, > > Sure, I got special requirement that just parse html file into DOM tree, > > by only general basic modules, and based on my DOM tree structure, draft an > > bitmap. > > > > So, could you give me an direction how to get the DO

Re: Get html DOM tree by only basic builtin moudles

2015-06-05 Thread Ian Kelly
On Fri, Jun 5, 2015 at 12:10 PM, Wesley wrote: > Hi Laura, > Sure, I got special requirement that just parse html file into DOM tree, by > only general basic modules, and based on my DOM tree structure, draft an > bitmap. > > So, could you give me an direction how to get the DOM tree? > Curr

Re: Get html DOM tree by only basic builtin moudles

2015-06-05 Thread Wesley
Hi Laura, Sure, I got special requirement that just parse html file into DOM tree, by only general basic modules, and based on my DOM tree structure, draft an bitmap. So, could you give me an direction how to get the DOM tree? Currently, I just think out to use something like stack, I mean, m

Re: Get html DOM tree by only basic builtin moudles

2015-06-04 Thread Laura Creighton
Elementtree is part of the Python standard library. You are better off using it than rolling your own. (If you were one of the rare people who have some very strange requirements that make you better off writing your own, you wouldn't be asking us. You'd already know.) https://docs.python.org/

Get html DOM tree by only basic builtin moudles

2015-06-04 Thread Wesley
Hi guys, I know there are many modules(builtin or not, e.g. beautifulsoup,xml,lxml,htmlparser .etc) to parse html files and output the DOM tree. However, if there is any better way to get the DOM tree without using those html/xml related modules? I mean, just by some general standard modules,

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

html DOM

2008-03-29 Thread Sam the Cat
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 this on a batch of files

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

HTML/DOM parser

2006-02-28 Thread Xah Lee
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 References • a... ... to References a... ... Thanks. Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ -- http://mail.python.org/mailman