Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Anybody using StAX?

 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How's your article on Stax doing?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Paulo Aquino
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Bill...do you have any sample code that uses stax to parse xml?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 775
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ??
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic