Dec. 31, 2008
1:39 a.m.
Hi, I'd like to quickly/efficiently get a list of all <?xml-stylesheet ?> processing instructions in a given document. I have managed to find it via root_tree.getprevious(), but it seems I need to search through the siblings here to find the <?xml-stylesheet ?> if indeed there is one. I'm using the HTML parser. Is there a more natural API? Also, serialising using lxml.html.tostring() seems to lose the <?xml-stylesheet ?> PI. Is this by design? Cheers, Martin -- Author of `Professional Plone Development`, a book for developers who want to work with Plone. See http://martinaspeli.net/plone-book