[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Partyin' like it's 1999


Re:  Partyin' like it's 1999
Dare Obasanjo wrote:

> The fact that namespaces in XML requires you to parse all attributes before you can report the name of the start tag even in streaming implementations adds a significant perf cost. I'm not even sure what the heck you mean by "complexity of allowing streaming attributes" considering that whatever API does this is already streaming everything else which makes not streaming attributes an inconsistency anyway.  
>  

All it means is that it's simpler for the client programmer to get the 
complete collection of attributes for an element as one bundle along 
with the start-tag, than to receive them one at a time. It's the same 
reason it's easier for the programmer to get a nice tree representation 
of the entire document (not a DOM, a *nice* tree representation) than it 
is to use something like SAX or XmlReader.

The difference between the two cases is that documents do get so large 
that there are significant performance hits to presenting the entire 
document at once, especially with respect to memory usage. This doesn't 
happen for all documents or all use cases, but it happens often enough 
that we need more complicated streaming APIs in addition to simpler 
tree-based APIs. (Again, I don't mean DOM when I write "simpler 
tree-based APIs".)

However, I have never seen a single element in a real-world XML document 
which had so many attributes that streaming the attributes one at a time 
would have been practical help worth the additional complexity that 
would be imparted to the API by such a solution. You're trying to solve 
a problem that doesn't exist in practice; or if it does exist, is so 
rare as to not be worth solving.

-- 
Elliotte Rusty Harold  elharo@m...
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.