From: Joe E. <jo...@em...> - 2006-03-06 09:29:09
|
Joachim Backhaus wrote: > since when does JSynthLib depend on JDom? > Please see my post to the developers' list dated Feb 22. 2006, when I added XML saving of patch data. > This weekend I tried to compile the newest JSynthLib > from the CVS source and got an error message because > I don't have JDom installed. > I thoughts I added the jdom.jar to CVS. So you should only need to include it in your classpath along with groovy.jar. > IMHO JSynthLib shouldn't use external libraries if > it cannot be avoided. > I agree whole-heartedly. However, JDOM was the only sensible object-oriented XML library I could find for Java. Plain Java has SAX and DOM parsers built-in, but all of the examples I've seen for them are very ugly. Indeed, *some* of the examples I saw for *writing* XML with the built-in SAX and DOM didn't even *use* the XML classes at *all*. They just use print statements to print the XML directly... leaving the developer responsible for all formatting and well-formedness issues (like this one: http://www.cafeconleche.org/books/xmljava/chapters/ch03s02.html). Meanwhile, JDOM allows for the developer to deal with the XML document in a completly object-oriented manner. It's so much of an improvement that some are expecting that JDOM will eventually be incorporated into J2SE (http://www.jcp.org/en/jsr/results?id=93). So, part of why I decided to include jdom.jar is because I expect that, someday, we'll be able to remove it when JDOM (or some other object-oriented XML suite) becomes part of the standard J2SE implementation. Lastly, I included it because *somebody* (cough, cough...) already included groovy.jar... and that's about 10x as big as jdom.jar. - Joe |