stefan_ml at behnel.de
Thu Sep 4 09:12:27 CEST 2008
you should really read about XPath. There are also newsgroups specifically for
this topic, please use them.
> in my python, i'm using the xpath function to iterate/parse some html. i can
> do something like
> and get the number of nodes that have text
That is a wrong assumption. It will give you the number of text nodes, not the
number of elements. They may or may not be the same.
> i can then do something like
> and get the number of total nodes...
> by subtracting, i can get the number of nodes, without text.. is there an
> easier way??!!
Yes, learn to use XPath, e.g.
More information about the Python-list