When running the following python script I get spaces left where nodes
have been removed. What am I doing wrong?
TIA
import libxml2
x = libxml2.parseDoc("""\
<?xml version="1.0" standalone="yes"?>
<rhythmdb version="1.0">
<entry type="song">
<location>file:///home/stan/shared/file</location>
</entry>
<entry type="podcast-feed">
<title>mm</title>
</entry>
<entry type="song">
<location>file:///home/stan/shared/file</location>
</entry>
<entry type="song">
<location>file:///home/stan/tmp/file</location>
</entry>
</rhythmdb>
""")
y = x.xpathEval("/rhythmdb/[EMAIL PROTECTED]'song']/location"
"[starts-with(., 'file:///home/stan/shared/')]/parent::*")
for node in y:
node.unlinkNode()
node.freeNode()
x.saveFile("-")
Tristan
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml