<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Hmmh. I thought I had contributed Stax builders way back when... what happened to those pieces?</span></div><div><br><span></span></div><div><span>For what it's worth, code is/was available at:</span></div><div><br><span></span></div><div><span>http://woodstox.codehaus.org/StaxMisc</span></div><div><br><span></span></div><div><span>and I thought ended up on jdom sandbox/contrib section.</span></div><div><br><span></span></div><div><span>-+ Tatu +-</span></div><div><span><br></span></div><div><br></div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><font face="Arial" size="2"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Rolf <jdom@tuis.net><br><b><span style="font-weight:
bold;">To:</span></b> jdom <jdom-interest@jdom.org><br><b><span style="font-weight: bold;">Sent:</span></b> Sunday, November 13, 2011 6:03 PM<br><b><span style="font-weight: bold;">Subject:</span></b> [jdom-interest] StAX support<br></font><br>
Hi All.<br><br>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.<br><br>I have been using as references the StAX specification, the JDOM 'way' of doing things, and the rest of the web.<br><br>Some observations I have:<br>1. StAX is currently the fastest way (slightly) to parse XML on my computer.<br>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.<br>3. XML Validation with StAX is 'hard'.<br>4. DOCTYPE handling in StAX is unpredictable.<br>5. after having been around for almost as long as JDOM, the StAX concept is still 'dynamic' and changing.<br><br>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.<br><br>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.<br><br>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.<br><br>It is still a 50/50 as to whether it should be in there, or be stripped out again.<br><br>What I would really like is to get in touch with a StAX 'expert' and run some of my concerns past them.<br><br>Is there someone on this list with some StAX insight?<br>Is there a forum anyone knows of that's dedicated to the StAX implementation in Java?<br><br>Anyway, I would appreciate it if some people with StAX experience played with the code:<br><br>String filename = "myfile.xml";<br>StreamSource source = new
StreamSource(new File(filename));<br>XMLInputFactory inputfac = XMLInputFactory.newInstance();<br>inputfac.setProperty(<br> "<a href="http://java.sun.com/xml/stream/properties/report-cdata-event" target="_blank">http://java.sun.com/xml/stream/properties/report-cdata-event</a>",<br> Boolean.TRUE);<br>XMLStreamReader reader = inputfac.createXMLStreamReader(source);<br><br>StAXStreamBuilder stxb = new StAXStreamBuilder();<br>Document staxbuild = stxb.build(reader);<br><br><br>Rolf<br>_______________________________________________<br>To control your jdom-interest membership:<br>http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com<br><br><br></div></div></div></body></html>