First let me say I love lxml!

I have noticed one problem though... (Although I am unsure whether the problem is with lxml or PEBCAK)

I need to insert comments both before and after the root element.  For what I can see this is not only perfectly legal but specifically allowed in the RFCs (although for the life of me I can find the relevant sections again)

I can not figure out how to perform this.  And from my testing it appears that even if I import (either tostring or parse) ignores a document which has comments before and after, it just ignores them...

For now I am running a "workaround" with just outputs the comments, then the xml, then the comments, but it would be much better if lxml could do it since there could be problems with the XML Declaration.

Thanks
Bob

--
The problem with socialism is that you eventually run out of other people's money.  -  Margaret Thatcher