|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








