Christian Zagrodnick wrote:
>>>> obj = lxml.objectify.XML('<a/><?foo:bar blurb ?>')
>>>> lxml.etree.tostring(obj)
> '<a/>'
You are requesting a serialisation of the Element, so that's the expected result.
This should work:
etree.tostring(etree.ElementTree(obj))
or:
etree.tostring(obj.getroottree())
Stefan