lxml/ElementTree and .tail
Fredrik Lundh
fredrik at pythonware.com
Sun Nov 19 10:32:14 EST 2006
Uche Ogbuji wrote:
> The fact that the XML Infoset is hardly used outside W3C XML Schema,
> and that the XPath data model is far more common,
and for the bystanders, it should be noted that the Infoset is pretty
much the same thing as the XPath data model; it's mostly just that the
specifications use different names for the same concept. if you cut
through the vocabulary, it's all about a tree of elements, plus text and
attributes and a few more (but usually less interesting) things. it's a
bit like arguing that
class Person(object):
__slots__ = ["name"]
def __init__(self, name):
self.name = name
and
class Employee:
def __init__(self, first_name, last_name):
self.full_name = first_name + " " + last_name
and
employee_name = "..."
are entirely different things, and not just three more or less con-
venient ways to store exactly the same information.
</F>
More information about the Python-list
mailing list