Sean Davis wrote: > I have an xml document and simply need to add an xml-stylesheet to > it. I am using lxml to parse the xml document and then would like to > insert the xml-stylesheet tag using the etree api. Any suggestions?
I assume you are talking about a processing instruction here, not a tag. Use the .addprevious() method on the root Element with a PI object. Stefan -- http://mail.python.org/mailman/listinfo/python-list