Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Anybody using StAX?

 
Author and all-around good cowpoke
Posts: 13078
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
 
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
Posts: 13078
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
 
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
Posts: 13078
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
 
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.
 
author and deputy
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
Posts: 13078
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
 
No holds barred. And no bars holed. Except this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic