Re: Using elementtree: replacing nodes

2006-05-02 Thread André
Fredrik Lundh wrote: > André wrote: > > > I've started using elementtree and don't understand how to use it to > > manipulate and replace nodes. [snip] It was mostly the following step which I couldn`t figure out... > # 2) mutate the pre element > pre.clear() > pre.tag = "form" >

Re: Using elementtree: replacing nodes

2006-05-02 Thread Fredrik Lundh
André wrote: > I've started using elementtree and don't understand how to use it to > manipulate and replace nodes. I know how to do this using a simple, > but inefficient parser I wrote, but I'd rather learn to use a better > tool - especially as it is to be added to the standard library. > Now

Using elementtree: replacing nodes

2006-05-01 Thread André
I've started using elementtree and don't understand how to use it to manipulate and replace nodes. I know how to do this using a simple, but inefficient parser I wrote, but I'd rather learn to use a better tool - especially as it is to be added to the standard library. I'll use a simple, but repr