[jdom-interest] StAX support
cowtowncoder at yahoo.com
Mon Nov 14 11:41:39 PST 2011
Ok, good -- I have nothing against improved version(s), just hoped existing one might give some inspiration. And sounds like it did.
DTD access (or lack thereof) is unfortunate indeed.
Thank you for explanation & good luck with further improvements, sounds like you have been improving jdom quite a bit.
-+ Tatu +-
----- Original Message -----
From: Rolf Lear <jdom at tuis.net>
To: Tatu Saloranta <cowtowncoder at yahoo.com>
Cc: jdom interest <jdom-interest at jdom.org>
Sent: Monday, November 14, 2011 11:22 AM
Subject: Re: [jdom-interest] StAX support
You did contribute (although it is not in 'contrib').
It's referenced on the 'issue'
I have taken a good look at it, and I decided that I could not use it
'as-is', for the primary reason that it performs too much 'filtering' of
content on the input side.
Also, it does not use the 'normal' JDOM ways for input and output.
I used it as a reference for a bunch of things, but, I have gone much,
much further, implementing fragment parsing, and working on Event as well
as Stream readers/writers.
Since the above commit, it has changed a lot more....
But, the notes on that commit basically identify why I re-did it instead
of using your contribution as-is.
Also, I am regretting the DTD stuff, which I am finding to be the biggest
issue with StAX (as I am sure you have found too).
On Mon, 14 Nov 2011 11:07:01 -0800 (PST), Tatu Saloranta
<cowtowncoder at yahoo.com> wrote:
> Hmmh. I thought I had contributed Stax builders way back when... what
> happened to those pieces?
> For what it's worth, code is/was available at:
> and I thought ended up on jdom sandbox/contrib section.
> -+ Tatu +-
> From: Rolf <jdom at tuis.net>
> To: jdom <jdom-interest at jdom.org>
> Sent: Sunday, November 13, 2011 6:03 PM
> Subject: [jdom-interest] StAX support
> Hi All.
> I have been trying to put StAX support in to JDOM for a little while
> and I have just pushed through the code to github that contains the
> majority of the anticipated API on the JDOM side for handling the StAX
> parsing/processing of XML.
> I have been using as references the StAX specification, the JDOM 'way'
> doing things, and the rest of the web.
> Some observations I have:
> 1. StAX is currently the fastest way (slightly) to parse XML on my
> 2. The StAX specification is perhaps the very worst specification I have
> ever seen for functionality currently in the Java language/API. I hope
> other concepts in the JCP process have better results.
> 3. XML Validation with StAX is 'hard'.
> 4. DOCTYPE handling in StAX is unpredictable.
> 5. after having been around for almost as long as JDOM, the StAX concept
> is still 'dynamic' and changing.
> Essentially, I have had a long hard look at it, and I think there were a
> number of oversights in the process.... it's a good concept that has had
> poor implementation.
> On the other hand, I have put a fair amount of thought in to it, and
> a long way to making it work well in JDOM (within the limitations of
> and there may be some use in it.
> My thinking is that I will leave the code in there for the moment, but
> is incomplete, and I really need to work on something else in the
> It is still a 50/50 as to whether it should be in there, or be stripped
> out again.
> What I would really like is to get in touch with a StAX 'expert' and run
> some of my concerns past them.
> Is there someone on this list with some StAX insight?
> Is there a forum anyone knows of that's dedicated to the StAX
> implementation in Java?
> Anyway, I would appreciate it if some people with StAX experience played
> with the code:
> String filename = "myfile.xml";
> StreamSource source = new StreamSource(new File(filename));
> XMLInputFactory inputfac = XMLInputFactory.newInstance();
> XMLStreamReader reader = inputfac.createXMLStreamReader(source);
> StAXStreamBuilder stxb = new StAXStreamBuilder();
> Document staxbuild = stxb.build(reader);
> To control your jdom-interest membership:
More information about the jdom-interest