[jdom-interest] StAX support

hi Tatu
You did contribute (although it is not in 'contrib').
It's referenced on the 'issue'
https://github.com/hunterhacker/jdom/issues/7
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.
https://github.com/hunterhacker/jdom/commit/59ee0d5384843d841c9a1f5fe8dd3b8fda2c8524
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).
Rolf
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:
>>http://woodstox.codehaus.org/StaxMisc>> 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
now,
> 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'
of
> 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
> computer.
> 2. The StAX specification is perhaps the very worst specification I have
> ever seen for functionality currently in the Java language/API. I hope
that
> 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
a
> poor implementation.
>> On the other hand, I have put a fair amount of thought in to it, and
gone
> a long way to making it work well in JDOM (within the limitations of
StAX),
> and there may be some use in it.
>> My thinking is that I will leave the code in there for the moment, but
it
> is incomplete, and I really need to work on something else in the
meantime.
>> 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();
> inputfac.setProperty(
> "http://java.sun.com/xml/stream/properties/report-cdata-event",
> Boolean.TRUE);
> XMLStreamReader reader = inputfac.createXMLStreamReader(source);
>> StAXStreamBuilder stxb = new StAXStreamBuilder();
> Document staxbuild = stxb.build(reader);
>>> Rolf
> _______________________________________________
> To control your jdom-interest membership:
>http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com