lxml/ElementTree and .tail

Chas Emerick cemerick at snowtide.com
Sat Nov 18 16:34:15 CET 2006

On Nov 18, 2006, at 5:09 AM, Fredrik Lundh wrote:

> Uche Ogbuji wrote:
>> I certainly have never liked the aspects of the ElementTree API under
>> present discussion.  But that's not as important as the fact that I
>> think the above statement is misleading.  There has always been a
>> battle in XML between the people who think the serialization is
>> preeminent, and those who believe some data model is preeminent, but
>> the reality is that XML 1.0 (an 1.1) is a spec *defined* by its
>> serialization.
> sure, the computing world is and has always been full of people who  
> want
> the simplest thing to look a lot harder than it actually is.  after  
> all,
> *they* spent lots of time reading all the specifications, they've  
> bought
> all the books, and went to all the seminars, so it's simply not fair
> when others are cheating.


> and keep patting our-
> selves on the back, while the rest of the world is busy routing around
> us, switching to well-understood XML subsets or other serialization
> formats, simpler and more flexible data models, simpler API:s, and
> more robust code.  and Python ;-)

That's flatly unrealistic.  If you'll remember, I'm not one of "those  
people" that are specification-driven -- I hadn't even *heard* of  
Infoset until earlier this week!  However, I am driven to ensure that  
the code I (and we) write works *as others expect* when confronted by  
any of the billions of XML documents out there.  Simpler is better,  
and better is better (thus why I am in python-land), unless that  
simplicity makes it difficult to play nicely with others.  Shrugging  
off the way everyone else does things reminds me of various CSS  
fanatics I know of that simply won't use tables or IE CSS  
compatibility hacks, even if that's what's needed to get things to work.

I've never been involved in any "XML battles", but to Uche's point, I  
would speculate (only on the basis of personal interactions and  
anecdotes) that some overwhelming majority of the developers out  
there care for nothing but the serialization, simply because that's  
how one plays nicely with others.  I would count myself in that group  
as well, although I do recognize that there is a worthy academic  
exercise in exploring the data-model-centric XML worldview.

OT: Uche, 4suite XML is tops!  Thank you very much for that.

- Chas

More information about the Python-list mailing list