aspose file tools*
The moose likes XML and Related Technologies and the fly likes Anybody using StAX? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Anybody using StAX?" Watch "Anybody using StAX?" New topic
Author

Anybody using StAX?

William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12788
    
    5
I am writing a little article on alternatives to the standard JAXP library. I found plenty of material on JDOM but not a whole lot on StAX.
StAX is the "Streaming API for XML" or (pull-pasing) alternative to SAX.
There is a JSR-173 finalized in March 2004 and StAX is expected to become part of Java 6.0.
I was wondering if anybody here has used it and could comment on how usable it is compared to SAX.
Bill
Paulo Aquino
Ranch Hand

Joined: Apr 29, 2002
Posts: 200
How's your article on Stax doing?


Be Afraid...Be very Afraid...
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12788
    
    5
The article appeared here.

I have not gotten any feedback from people using StAX - which is curious because it looks potentially useful and is likely to be part of the standard library in the future.
There is an implementation in the Web Services Developer Pack

If anybody has comments I would love to hear them - trying to keep up with developments in the XML area is tough!
Bill
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
Originally posted by William Brogden:
If anybody has comments I would love to hear them - trying to keep up with developments in the XML area is tough!
Bill



Tell me about it. I had to go google what Chiba is.....

- m


Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Paulo Aquino
Ranch Hand

Joined: Apr 29, 2002
Posts: 200
Hey Bill...do you have any sample code that uses stax to parse xml?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12788
    
    5
I downloaded the Web Services Developer Pack but have not tried to write code using StAX. However, I did find this site showing example XML and code to handle it.
Bill
Reid M. Pinchback
Ranch Hand

Joined: Jan 25, 2002
Posts: 775
I've written some Stax code. Anybody comfortable writing
SAX won't find it hard to write Stax, but the process is
a little bit different. It'll seem more like DOM not because
of the API, but because you have to know the structure of the
XML tree you are trying to traverse. Stax is definitely faster.
The fussy part about Stax is that you have to role up your
shirt sleeves to get things like validation.


Reid - SCJP2 (April 2002)
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Originally posted by William Brogden:
The article appeared here.
Bill


Another site to register. Bill do you have the copy of the article in your website ??


Spritle Software Blogs
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12788
    
    5
Not at present, the publisher would probably prefer that I just put links on my website. Another site chore I have been putting off :roll:
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Anybody using StAX?