List Info

Thread: copyNodeList eats all memory...




copyNodeList eats all memory...
user name
2006-08-20 22:57:00
Hi,

I made a small Python program to duplicate specific branches
and put the copies somewhere in the tree.  For that I'm
using
copyNodeList, something like:

    for curnode in somenodelist:
	newnode = curnode.copyNodeList()
	othernode.addNextSibling(newnode)

This works fine for a 1 MB XML document and the output seems
to
be what I want, but with a 7 MB document it slows done
pretty fast
and finally eats all memory, even on a 2 GB memory system!

Am I doing something wrong?  What is the recommended way of
doing
a recursive copy of branches using libxml2?

Thanks,

--
--    Jos Vos <josxos.nl>
--    X/OS Experts in Open Systems BV   |   Phone: +31 20
6938364
--    Amsterdam, The Netherlands        |     Fax: +31 20
6948204
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )