Writing XML From Java
Love XML or hate it, sometimes Java applications need to output XML. This talk presents two Java libraries for writing XML, XStream and WAX, that make it really simple! In addition, WAX is very memory efficient, making it ideal for writing large XML documents.
See http://ociweb.com/wax and http://xstream.codehaus.org.
The first library covered is XStream, an open source library for serializing Java objects to and from XML. Compared to Castor, another similar library, it is simpler and requires less configuration. The second library covered is Writing API for XML (WAX). WAX is a new approach to writing XML that
- requires less code than most other approaches
- uses less memory than other approaches
- is a small library (around 12K)
- doesn't depend on any Java classes other than standard JDK classes
- writes all XML node types
- provides extensive error checking
- automatically escapes special characters in text and attribute values when error checking is turned on
- allows all error checking to be turned off for performance
- knows how to associate DTDs, XML Schemas and XSLT stylesheets with the XML it outputs
- is well-suited for writing XML request and response messages for REST-based and SOAP-based services
About Mark Volkmann
Mark Volkmann is a partner at Object Computing, Inc. (OCI) in St. Louis where he has provided software consulting and training since 1996. As a consultant, Mark has assisted many companies with Java, XML, Web, JavaScript, jQuery, Node.js, and AngularJS application development.
Mark has created and taught many courses on topics including: Java, Swing, XML, Ruby, HTML5, CSS3, JavaScript, jQuery, Node.js, and AngularJS.
Mark is a frequent presenter at St. Louis area user groups. He has written for XML Journal and the No Fluff Just Stuff (NFJS) magazine. He has presented at the XML DevCon, NFJS and Strange Loop conferences.
Mark frequently writes articles on various software development topics. These can be found at http://ociweb.com/sett.
More About Mark »