13 Jun
2005
13 Jun
'05
10:44 p.m.
Hello list. I've found something really weird with lxml, I hope you can help me. I want dump() output but I can't get it and tostring returns the full xml document, not the part I need.
import lxml.etree mydoc = lxml.etree.fromstring('<?xml version="1.0"?><req><oml><section><list><items><item>quick</item></items></list></section></oml></req>') lxml.etree.tostring(oml) '<req><oml><section><list><items><item>quick</item></items></list></section></oml></req>' lxml.etree.dump(oml) <oml><section><list><items><item>quick</item></items></list></section></oml> oml <Element oml at -481b6608>
lxml version 0.6 -- dharana