lxml/ElementTree and .tail
Fredrik Lundh
fredrik at pythonware.com
Thu Nov 16 05:11:35 EST 2006
Paul Boddie wrote:
>> Yes, it is. Just look at the API. It's an attribute of an Element, isn't it?
>> What other API do you know where removing an element from a data structure
>> leaves part of the element behind?
>
> I guess it depends on what you regard an element to be...
Stefan said "Element", not "element".
"Element" is a class in the "ElementTree" module, which can be used to
*represent* an XML element in an XML infoset, including all the data
*inside* the XML element, and any data *between* that XML element and
the next one (which is always character data, of course).
It's not very difficult, really; especially if you, as Stefan said,
think in infoset terms rather "a sequence of little piggies" terms.
</F>
More information about the Python-list
mailing list