From: Yuri T. <qar...@gm...> - 2009-08-21 12:27:00
|
> from the h2 text.) markdown.etree does give me findall... but the > Elements I get back don't appear to have any sibling operations that > would let me do that. I can't remember right now, but it's possible that ElementTree interface just doesn't provide that method. > second is, does it make sense to consider lxml.etree another candidate > for etree_loader.importETree? (That would at least give me > addprevious which does exactly what I'm looking for...) We did at one point, but found lxml's implementation of ETree to have a lot of quirks along the lines you mentioned below. (You can search the list archives for "lxml" to find those discussions.) It may be worth looking at this again and considering if we can fix those issues on our end, but at the time, if I remember correctly, it didn't seem worth it. Have you considered just traversing the tree top-down once and inserting all the extra tags that you need? - yuri |