5 Feb 21:02
Re: Get the xml-stylesheet processing instruction
Emanuele D'Arrigo <manu3d <at> gmail.com>
2010-02-05 20:02:48 GMT
2010-02-05 20:02:48 GMT
On 5 February 2010 18:38, David Chandek-Stark <dchandekstark <at> gmail.com> wrote:
True, obtaining PIs (and comments) is not exactly intuitive nor straightforward (in, fact for head-of-file PIs it's straightbackward!! =) ). I guess ideally there could be a list of them available via read-only properties on the tree object, i.e.: docTree.PIs and docTree.comments.
Manu
I had a hard time tracking this info down (only figured out after reading the thread at http://codespeak.net/pipermail/lxml-dev/2006-September/001903.html), so posted a recipe:
True, obtaining PIs (and comments) is not exactly intuitive nor straightforward (in, fact for head-of-file PIs it's straightbackward!! =) ). I guess ideally there could be a list of them available via read-only properties on the tree object, i.e.: docTree.PIs and docTree.comments.
Manu
_______________________________________________ lxml-dev mailing list lxml-dev <at> codespeak.net http://codespeak.net/mailman/listinfo/lxml-dev
RSS Feed