[lxml-dev] Status of lxml 1.1.2
Lee Brown
lee.brown at elecdev.com
Tue Feb 6 19:55:01 CET 2007
Greetings!
I've been playing with the windows/python2.4 build of lxml 1.1.2 that Sidnei
just put up.
I presume from the previous mailing list traffic and some code introspection
that this is the "right" way to handle xml-stylesheet PIs:
xml_tree = etree.parse(xml_data)
xsl_pi = xml_tree.getroot().getprevious()
xsl_tree = xsl_pi.parseXSL()
transformer = etree.XSLT(xsl_tree)
result = transformer(xml_tree)
There's one suprise, though: I had thought from the mailing list discussion
that 'href' attribute would be accessible by the get() and set() methods - but
it isn't; everything past the tag is kept simply as text. (I presume that it
inherited this behavior from some processing instruction base class.) Would it
be possible to add get() and set() methods in a future release?
More information about the lxml-dev
mailing list