16 May 11:56
Re: Efficient methods to build a tree out of HTML structure?
From: Stefan Behnel <stefan_ml <at> behnel.de>
Subject: Re: Efficient methods to build a tree out of HTML structure?
Newsgroups: gmane.comp.python.lxml.devel
Date: 2008-05-16 09:56:56 GMT
Subject: Re: Efficient methods to build a tree out of HTML structure?
Newsgroups: gmane.comp.python.lxml.devel
Date: 2008-05-16 09:56:56 GMT
Viksit Gaur wrote: > The problem I face was a method to assign a unique ID to each > element on the page. > > Lets say I construct an iterwalk object. But, during this phase, I would > like to not only build the tree, but also add some of my own information > to each node (such as a unique ID to each element). I still don't understand what you mean with "build the tree". You can't construct a tree and run iterwalk at the same time. iterparse() will do that in case you are parsing. Stefan
RSS Feed