On Tuesday, April 24, 2012 9:00:25 AM UTC-4, Anthony wrote:
>
> I guess there is no way of getting at the index subscript from elements()?
>>
>
> No, and returning indexes for a given element would be tricky because it 
> searches recursively through the DOM tree, so you might need to subscript 
> the top-level element multiple times to traverse to an element found deeper 
> in the tree. It would be great if we had a .replace() method that worked 
> like .elements() but allowed a replacement to be specified (specify None as 
> the replacement in order to delete).
>

Actually, I guess it would be easier to just add a "replacement" argument 
to .elements().

Anthony 

Reply via email to