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

Re: Inversion of control (was: DOM's javascript roots (was Re:


xml dom javascript

On Apr 25, 2006, at 5:34 PM, Tatu Saloranta wrote:

> But for other use cases -- for example,
> recursive-descent traversal -- event mode is
> ass-backwards.

When do you really need to do that? I have an extension of  
DefaultHandler that manages a stack of seen elements so I can track  
nesting (calls like getPath() etc). For 99% of the stuff I do, that  
is enough.

> While I have written event dispatchers (just as pretty
> anyone who has had to work on bare SAX API), it is
> monkey work best avoided. Like climbing up the tree
> ass first. Better delegate that monkey work to parser
> implementors.

That depends on your purpose. If you're building a DOM tree, I'd  
agree. If you're just ripping data out of an XML and stuffing it into  
POJOs, I'd disagree. Even simple path-driver data extraction (prices  
form orders etc.) can be handled easily using SAX without the  
overhead of instantiating DOM trees for XPath engines to operate on.  
Recursive-descent is a waste of time for data-binding too IMHO.

> Why? If I am doing data binding, it is the end of the
> line. Same for parsing configuration settings or
> import/exporting data of different type (object
> graphs, relational data).

If you're doing data binding, the value of DOM is questionable.

> While pipelines are important for transformations
> within xml (infoset), their utility ends where XML
> domains starts/ends.

That's true of DOM as well.



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.