I have an unclear xml and process it with python lxml module. I want replace all
in content with space
before any processing, how can I do this work for text of all elements.
edit my xml example:
<root>
<a> dsdfs
dsf
sdf
</a>
<bds>
<d>sdf
</d>
<d>sdf
sdf
sdf
</d>
</bds>
....
....
....
....
</root>
and i wan't to get this in output when i print ittertext:
root = #get root element
for i in root.ittertext():
print i
dsdfs dsf sdf
dsdfs dsf sdf
sdf nsdf sdf
See Question&Answers more detail:os