The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
StAX + XMLBeans == Java XML APIs

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Jackson Miller

Posts: 222
Nickname: jaxn
Registered: Oct, 2004

Jackson Miller is a software developer in Nashvillle, TN currently working at CentreSource.com
StAX + XMLBeans == Java XML APIs Posted: Oct 13, 2005 7:50 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Jackson Miller.
Original Post: StAX + XMLBeans == Java XML APIs
Feed Title: Jackson Miller - ruby
Feed URL: http://jaxn.org
Feed Description: the view from East Nashville
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Jackson Miller
Latest Posts From Jackson Miller - ruby

Advertisement
Eliotte Rusty Harold has an XML.com article on StAX. It's a good introduction to this style of API.

He didn't like the use of integer type codes, preferring to have objects. I view StAX as a replacement for SAX, which is basically the bottom of the stack for XML processing API's. You can use SAX or StAX to build trees or beans or whatever you like. So any performance penalty that you impose on StAX is something you've imposed on everybody above you in the food chain, and there's no way to get that performance back if you need it. I think that they did the right thing here. The performance of reflection is never going to match integer comparison. Also, Andy Clark, the author of NekoPull is a member of the expert group as well.

As noted, the state management is much easier than SAX -- it allows you to write a more recursive-descent style of object construction. One of the problems with SAX is that it's very hard to use it to create objects in a way that allows you to reuse the objects and the SAX handler for building those objects. StAX makes that go away.

In many cases what you want is an easy to manipulate representation of the XML data. This is very frequently a Java Bean. So what you really want is an API that takes an XML stream, and gives me back the right Java Bean. And that's what XMLBeans is all about.

So in my view of the Java XML API world, there's StAX at the bottom, and on top of that you have XMLBeans. If you need to do weird document editing tree stuff, then there's StAX at the bottom, and on top of that there's the DOM or XOM or JDOM or whatever. But for most applications that I've worked on, the combination of StAX and XMLBeans would cover it. If you look at the XMLBeans Roadmap, you'll see that one of the goals is to support StAX (JSR 173), which would mean one stop shopping, er, downloading. My hope is that as XMLBeans evolves we'll be able to have a simple to use library.

Read: StAX + XMLBeans == Java XML APIs

Topic: Takahashi Method Spreads Previous Topic   Next Topic Topic: Return of the Spreadsheet

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use