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

RE: DOM or SAX: Sense and Sensibility


sense and sensibility extracts
> From: david.hunter@m... [mailto:david.hunter@m...]
> Sent: Wednesday, November 07, 2001 11:28 AM
> To: clbullar@i...; xml-dev@l...
> Subject: RE:  DOM or SAX: Sense and Sensibility

<snip/>

> 1)  A lot of programmers are not really used to event-based 
> programming, as
> used by SAX.  They're more comfortable working with an 
> in-memory object
> model than in keeping track of context as events are passed in, etc.

Yes, and the difficulty, here, is not just with the notion of event-based
programming, but with conceptualizing the design of a component as a
state-machine. I've found many developers have difficulty thinking in those
terms for whatever reason.

<snip/>

> 3)  For COM programmers, who use Microsoft technologies 
> extensively:  MSXML
> had [some] DOM support long before it had SAX support.  I 
> think a lot of
> programmers, who aren't XML gurus, just got used to the fact 
> that "this is
> the way you work with XML".  I've even heard people referring 
> to an XML
> document as "a DOM", which shows how deep the confusion can go.

The case of MSXML offers another good example of why many programmers use
the DOM. Microsoft's DOM includes integrated XPath support. Developers can
load XML into a DOM, then easily query the structure with XPath to extract
the data they are after. Switching to SAX adds substantial complexity to the
code, which now has to deal with state management strategies to keep track
of where it is in the document at any moment.

I've found many developers in the Microsoft world take the integrated XPath
support for granted and don't realize that it is not a standard DOM feature
(yet).

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.