[lxml-dev] Processing instruction doubt

Dec. 20, 2006
9:04 a.m.
Hello all, This should be rather a stupid question, but supposing I have an ElementTree instance, and I want to add a processing instruction to it - in my case, a xml-stylesheet PI - how do I add that PI in the correct location of the tree (i.e. before the root) without serializing ? <?xml-stylesheet type="text/xsl" href="stylesheet.xsl"> <data> ... </data> Before someone answers "add the PI into the XSLT before serializing it", the ElementTree is received by a function from an end user and I have no control over what's received. Thanks. -- Best Regards, Steve Howe
6641
Age (days ago)
6641
Last active (days ago)
0 comments
1 participants
participants (1)
-
Steve Howe