24 May
2008
24 May
'08
10:43 a.m.
Hi all, When building a tree, I add a particular attribute to each element (eg: ID), and was wondering if there are any methods I could use to search the tree for tags that have this attribute? I looked at find(), findall() and the xpath functions - but they seem to help only when you know the tag name itself. Of course, one way might be to do a manual depth first or breadth first search from the root downwards, recursively.. But that would become expensive pretty soon. Thanks, Viksit