Lxml is an excellent program, but its documentation is very terse, and often assumes a reader who already "sort of" knows what the actual reader does not. Steven Pinker in his Sense of Style has a chapter on "The Curse of Knowledge" with the wonderful topic sentence: "The main cause of incomprehensible prose is the difficulty of imaging what it's like for someone else not to know something that you know".
I had trouble with etree.strip_tags but discovered that you can't add secondary constraints to a strip_tag command. Thus you can strip all "hi" children of a div, but you cannot do this for <hi> tags with less than child elements. Is that the case? ) If you want to operate on <hi> elements with further specification, you select them and then use the "addnext" method, looping through the <hi> element in reverse order. Is that correct? Martin Mueller Professor emeritus of English and Classics Northwestern University
_______________________________________________ lxml - The Python XML Toolkit mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/lxml.python.org Member address: [email protected]
