Deep XML modification..

Alan Kennedy alanmk at hotmail.com
Wed Nov 20 07:03:10 EST 2002


nobody wrote:

> Whats the best way to modify deep branches of XML?  The tree is eight
> levels deep, so I have a forrest of cloneNode and replaceChild, to
> propogate changes from the leaves back to the root Document.  

Hmm, why would you want to "propagate changes back to the root"? You
give the impression that you want to change some nodes 8 levels down.
That shouldn't necessitate any changes to the root.

> There has got to be a
> better way?  I also want to avoid pre-sorting the data into a list,
> and keep it entirely XML if possible.

Methinks you have some application specific requirements that you're not
sharing with us. Why would want to transfer the data into a list? Is the
data sorted in some way?

Perhaps it would better if you either

A: Told us the nature of your data and the constraints you have placed
on it?
B: Posted one of your XML document structures, with perhaps before and
after examples to tell us what you're trying to achieve. 

regards,

-- 
alan kennedy
-----------------------------------------------------
check http headers here: http://xhaus.com/headers
email alan:              http://xhaus.com/mailto/alan



More information about the Python-list mailing list