XML and Java Alex Chaffee, alex@jguru.com http://www.purpletech.com
Overview Why Java and XML? Parsers: DOM, JDOM, SAX Using XML from JSP Java/XML Object Mapping Resources
Why Java/XML? XML maps well to Java late binding hierarchical (OO) data model Unicode support in Java XML Structures map well to Java Objects Portability Network friendly
XML Parsers Validating/Non-Validating Tree-based Event-based SAX-compliance Not technically parsers XSL XPath
Some Java XML Parsers DOM Sun JAXP IBM XML4J Apache Xerces Resin (Caucho) DXP (DataChannel) SAX Sun JAXP SAXON JDOM
Dom API Tree-based Node classes Part of W3C spec Sorting/Modifying of Elements Sharing document with other applications
XML is a Tree <?xml version=&quot;1.0&quot;?> <!DOCTYPE menu SYSTEM &quot;menu.dtd&quot;> <menu> <meal name=&quot;breakfast&quot;> <food>Scrambled Eggs</food> <food>Hash Browns</food> <drink>Orange Juice</drink> </meal> <meal name=&quot;snack&quot;> <food>Chips</food> </meal> </menu> menu meal name &quot;breakfast&quot; food &quot;Scrambled Eggs&quot; food &quot;Hash Browns&quot; drink &quot;Orange Juice&quot; meal
DOM API (cont’d) Based on Interfaces Good design style - separate interface from implementation Document, Text, Processing Instruction, Element - ALL are interfaces All extend interface Node Including interface Attr (parentNode is null, etc)
DOM Example public void print(Node node) {  //recursive method call using DOM API... int type = node.getNodeType(); case Node.ELEMENT_NODE: // print element with attributes out.print('<'); out.print(node.getNodeName()); Attr attrs[] = node.getAttributes(); for (int i = 0; i < attrs.length; i++) { Attr attr = attrs[i]; out.print(' ');  out.print(attr.getNodeName());out.print(&quot;=\&quot;&quot;); out.print(normalize(attr.getNodeValue()));  out.print('&quot;'); } out.print('>'); NodeList children = node.getChildNodes(); if (children != null) { int len = children.getLength(); for (int i = 0; i < len; i++) { print(children.item(i)); } } break; case Node.ENTITY_REFERENCE_NODE: // handle entity reference nodes // ...
DOM API Highlights Node getNodeType() getNodeName() getNodeValue() returns null for Elements getAttributes() returns null for non-Elements getChildNodes() getParentNode() Element getTagName() same as getNodeName() getElementsByTagName(String tag) get all children of this name, recursively normalize() smooshes text nodes together Attr attributes are not technically child nodes getParent() et al. return null getName(), getValue() Document has one child node  - the root element call getDocumentElement() contains factory methods for creating attributes, comments, etc.
DOM Level 2 Adds namespace support, extra methods Not supported by Java XML processors yet
The Trouble With DOM Written by C programmers Cumbersome API Node does double-duty as collection Multiple ways to traverse, with different interfaces Tedious to walk around tree to do simple tasks Doesn't support Java standards (java.util collections)
JDOM: Better than DOM Java from the ground up Open source Clean, simple API Uses Java Collections
JDOM vs. DOM Classes / Interfaces Java / Many languages Java Collections / Idiosyncratic collections getChildText() and other useful methods / getNextSibling() and other useless methods
JDOM: The Best of Both Worlds Clean, easy to use API document.getRootElement().getChild(&quot;book&quot;). getChildText(&quot;title&quot;) Random-access tree model (like DOM) Can use SAX for backing parser Open Source, not Standards Committee Allowed benevolent dictatorship -> clean design
JDOM Example XMLOutputter out = new XMLOutputter(); out.output( element, System.out ); Or…  public void print(Element node) {  //recursive method call using JDOM API... out.print('<'); out.print(node.getName()); List attrs = node.getAttributes();  for (int i = 0; i < attrs.size(); i++) { Attribute attr = (Attribute)attrs.get(i); out.print(' ');  out.print(attr.getName());out.print(&quot;=\&quot;&quot;); out.print(attr.getValue() );  out.print('&quot;'); } out.print('>'); List children = node.getChildren(); if (children != null) { for (int i = 0; i < children.size(); i++) { print(children.item(i)); } }
JDOM Example public Element toElement(User dobj) throws IOException { User obj = (User)dobj; Element element = new Element(&quot;user&quot;); element.addAttribute(&quot;userid&quot;, &quot;&quot;+user.getUserid()); String val; val = obj.getUsername(); if (val != null) {   element.addChild(new Element(&quot;username&quot;).setText(val)); } val = obj.getPasswordEncrypted(); if (val != null) {   element.addChild(new  Element(&quot;passwordEncrypted&quot;).setText(val)); } return element; }
JDOM Example public User fromElement(Element element) throws DataObjectException { List list; User obj = new User(); String value = null; Attribute userid = element.getAttribute(&quot;userid&quot;); if (userid != null) {   obj.setUserid( userid.getIntValue() ); } value = element.getChildText(&quot;username&quot;); if (value != null) {   obj.setUsername( value ); } value = element.getChildText(&quot;passwordEncrypted&quot;); if (value != null) {   obj.setPasswordEncrypted( value ); } return obj; }
DOMUtils DOM is clunky DOMUtils.java - set of utilities on top of DOM http://www.purpletech.com/code Or just use JDOM
Event-Based Parsers Scans document top to bottom Invokes callback methods Treats XML not like a tree, but like a list (of tags and content) Pro: Not necessary to cache entire document Faster, smaller, simpler Con:  must maintain state on your own can't easily backtrack or skip around
SAX API Grew out of xmldev mailing list (grassroots) Event-based startElement(), endElement() Application intercepts events Not necessary to cache entire document
Sax API (cont’d) public void startElement(String name, AttributeList atts) { // perform implementation out.print(“Element name is “ + name); out.print(“, first attribute is “ + atts.getName(0) + “, value is “ + atts.getValue(0)); }
XPath The stuff inside the quotes in XSL Directory-path metaphor for navigating XML document &quot;/curriculum/class[4]/student[first()]&quot; Implementations  Resin (Caucho) built on DOM JDOM has one in the &quot;contrib&quot; package Very efficient API for extracting specific info from an XML tree Don't have to walk the DOM or wait for the SAX Con: yet another syntax / language, without full access to Java libraries
XSL eXtensible Stylesheet Language transforms one XML document into another XSL file is a list of rules Java XSL processors exist Apache Xalan (not to be confused with Apache Xerces) IBM LotusXSL Resin SAXON XT
Trouble with XSL It's a programming language masquerading as a markup language Difficult to debug Turns traditional programming mindset on its head Declarative vs. procedural Recursive, like Prolog Doesn't really separate presentation from code
JSP JavaServer Pages Outputting XML <%  User = loadUser(request.getParameter(&quot;username&quot;)); response.setContentType(&quot;text/xml&quot;); %> <user> <username><%=user.getUsername()%></username> <realname><%=user.getRealname()%></realname> </user> Can also output HTML based on XML parser, naturally (see my &quot;JSP and XML&quot; talk, or http://www.purpletech.com)
XMLC A radical solution to the problem of how to separate presentation template from logic… …to actually separate the presentation template from the logic!
XMLC Architecture HTML (with ID tags) Java Class (e.g. Servlet) HTML Object (automatically generated) XMLC HTML (dynamically-generated) Setting values Data Reading data
XMLC Details Open-source (xmlc.enhydra.org) Uses W3C DOM APIs Generates &quot;set&quot; methods per tag Source: <H1 id=&quot;title&quot;>Hello</H1> Code: obj.setElementTitle(&quot;Goodbye&quot;)  Output: <H1>Goodbye</H1> Allows graphic designers and database programmers to develop in parallel Works with XML source too
XML and Java in 2001 Many apps' config files are in XML Ant Tomcat Servlets Several XML-based Sun APIs JAXP JAXM ebXML SOAP (half-heartedly supported   )
Java XML Documentation Jdox Javadoc -> single XML file http://www.componentregistry.com/ Ready for transformation (e.g. XSL) Java Doclet http://www.sun.com/xml/developers/doclet Javadoc -> multiple XML files (one per class) Cocoon Has alpha XML doclet
Soapbox: DTDs are irrelevant DTDs describe structure of an unknown document But in most applications, you already know the structure – it's implicit in the code If the document does not conform, there will be a runtime error, and/or corrupt/null data This is as it should be! GIGO. You could have a separate &quot;sanity check&quot; phase, but parsing with validation &quot;on&quot; just slows down your app Useful for large-scale document-processing applications, but not for custom apps or transformations
XML and Server-Side Java
Server-Side Java-XML Architecture Many possible architectures XML Data Source disk or database or other data feed Java API DOM or SAX or XPath or XSL XSL optional transformation into final HTML, or HTML snippets, or intermediate XML Java Business Logic  JavaBeans and/or EJB Java Presentation Code Servlets and/or JSP and/or XMLC
Server-Side Java-XML Architecture Java UI Java Business Logic XML Processors XML Data Sources HTML JSP JavaBeans Servlet EJB DOM, SAX XPath XSL Filesystem XML-savvy RDBMS XML Data Feed
Server-Side Architecture Notes Note that you can skip any layer, and/or call within layers e.g. XML->XSL->DOM->JSP, or JSP->Servlet->DOM->XML
Cache as Cache Can Caching is essential Whatever its advantages, XML is  slow Cache results on disk and/or in memory
XML <-> Java Object Mapping
XML and Object Mapping Java -> XML Start with Java class definitions Serialize them - write them to an XML stream Deserialize them - read values in from previously serialized file XML -> Java Start with XML document type Generate Java classes that correspond to elements Classes can read in data, and write in compatible format (shareable)
Java -> XML Implementations Java -> XML BeanML Coins / BML Sun's XMLOutputStream/XMLInputStream XwingML (Bluestone) JDOM BeanMapper Quick? JSP (must roll your own)
BeanML Code (Extract) <?xml version=&quot;1.0&quot;?> <bean class=&quot;java.awt.Panel&quot;> <property name=&quot;background&quot; value=&quot;0xeeeeee&quot;/> <property name=&quot;layout&quot;> <bean class=&quot;java.awt.BorderLayout&quot;/> </property> <add> <bean class=&quot;demos.juggler.Juggler&quot; id=&quot;Juggler&quot;> <property name=&quot;animationRate&quot; value=&quot;50&quot;/> <call-method name=&quot;start&quot;/> </bean> <string>Center</string> </add> … </bean>
Coins Part of MDSAX Connect XML Elements and JavaBeans Uses Sax Parser, Docuverse DOM to convert XML into JavaBean Uses BML - (Bindings Markup Language) to define mapping of XML elements to Java Classes
JDOM BeanMapper Written by Alex Chaffee   Default implementation outputs element-only XML, one element per property, named after property Also goes other direction (XML->Java) Doesn't (yet) automatically build bean classes Can set mapping to other custom element names / attributes
XMLOutputStream/XMLInputStream From some Sun engineers http://java.sun.com/products/jfc/tsc/articles/persistence/ May possibly become core, but unclear Serializes Java classes to and from XML Works with existing Java Serialization Not tied to a specific XML representation You can build your own plug-in parser Theoretically, can be used for XML->Java as well
XMLOutputStream/XMLInputStream
 
XML -> Java Implementations XML -> Java Java-XML Data Binding (JSR 31 / Adelard) IBM XML Master (Xmas) Purple Technology XDB Breeze XML Studio (v2)
Adelard (Java-XML Data Binding) Java Standards Request 31 Still vapor! (?)
Castor Implementation of JSR 31 http://castor.exolab.org Open-source
IBM XML Master (&quot;XMas&quot;) Not vaporware - it works!!! Same idea as Java-XML Data Binding From IBM Alphaworks Two parts builder application visual XML editor beans
Brett McLaughlin's Data Binding Package See JavaWorld articles
Purple Technology XDB In progress (still vapor) Currently rewriting to use JDOM JDOMBean helps Three parts XML utility classes XML->Java data binding system Caching filesystem-based XML database (with searching)
Conclusion Java and XML are two great tastes that taste great together
Resources XML Developments: Elliot Rusty Harold:  Café Con Leche - metalab.unc.edu/xml Author, XML Bible Simon St. Laurent www.simonstl.com Author, Building XML Applications General www.xmlinfo.com www.oasis-open.org/cover/xml.html www.xml.com www.jdm.com www.purpletech.com/xml
Resources: Java-XML Object Mapping JSR 31 http://java.sun.com/aboutJava/communityprocess/jsr/jsr_031_xmld.html http://java.sun.com/xml/docs/binding/DataBinding.html XMas http://alphaworks.ibm.com/tech/xmas
Resources XSL: James Tauber:  xsl tutorial: www.xmlsoftware.com/articles/xsl-by-example.html Michael Kay Saxon home.iclweb.com/icl2/mhkay/Saxon.html James Clark  XP Parser, XT editor, XSL Transformations W3C Spec
Resources: JDOM www.jdom.org
Thanks To John McGann Daniel Zen David Orchard My Mom

Xml Java

  • 1.
    XML and JavaAlex Chaffee, [email protected] http://www.purpletech.com
  • 2.
    Overview Why Javaand XML? Parsers: DOM, JDOM, SAX Using XML from JSP Java/XML Object Mapping Resources
  • 3.
    Why Java/XML? XMLmaps well to Java late binding hierarchical (OO) data model Unicode support in Java XML Structures map well to Java Objects Portability Network friendly
  • 4.
    XML Parsers Validating/Non-ValidatingTree-based Event-based SAX-compliance Not technically parsers XSL XPath
  • 5.
    Some Java XMLParsers DOM Sun JAXP IBM XML4J Apache Xerces Resin (Caucho) DXP (DataChannel) SAX Sun JAXP SAXON JDOM
  • 6.
    Dom API Tree-basedNode classes Part of W3C spec Sorting/Modifying of Elements Sharing document with other applications
  • 7.
    XML is aTree <?xml version=&quot;1.0&quot;?> <!DOCTYPE menu SYSTEM &quot;menu.dtd&quot;> <menu> <meal name=&quot;breakfast&quot;> <food>Scrambled Eggs</food> <food>Hash Browns</food> <drink>Orange Juice</drink> </meal> <meal name=&quot;snack&quot;> <food>Chips</food> </meal> </menu> menu meal name &quot;breakfast&quot; food &quot;Scrambled Eggs&quot; food &quot;Hash Browns&quot; drink &quot;Orange Juice&quot; meal
  • 8.
    DOM API (cont’d)Based on Interfaces Good design style - separate interface from implementation Document, Text, Processing Instruction, Element - ALL are interfaces All extend interface Node Including interface Attr (parentNode is null, etc)
  • 9.
    DOM Example publicvoid print(Node node) { //recursive method call using DOM API... int type = node.getNodeType(); case Node.ELEMENT_NODE: // print element with attributes out.print('<'); out.print(node.getNodeName()); Attr attrs[] = node.getAttributes(); for (int i = 0; i < attrs.length; i++) { Attr attr = attrs[i]; out.print(' '); out.print(attr.getNodeName());out.print(&quot;=\&quot;&quot;); out.print(normalize(attr.getNodeValue())); out.print('&quot;'); } out.print('>'); NodeList children = node.getChildNodes(); if (children != null) { int len = children.getLength(); for (int i = 0; i < len; i++) { print(children.item(i)); } } break; case Node.ENTITY_REFERENCE_NODE: // handle entity reference nodes // ...
  • 10.
    DOM API HighlightsNode getNodeType() getNodeName() getNodeValue() returns null for Elements getAttributes() returns null for non-Elements getChildNodes() getParentNode() Element getTagName() same as getNodeName() getElementsByTagName(String tag) get all children of this name, recursively normalize() smooshes text nodes together Attr attributes are not technically child nodes getParent() et al. return null getName(), getValue() Document has one child node - the root element call getDocumentElement() contains factory methods for creating attributes, comments, etc.
  • 11.
    DOM Level 2Adds namespace support, extra methods Not supported by Java XML processors yet
  • 12.
    The Trouble WithDOM Written by C programmers Cumbersome API Node does double-duty as collection Multiple ways to traverse, with different interfaces Tedious to walk around tree to do simple tasks Doesn't support Java standards (java.util collections)
  • 13.
    JDOM: Better thanDOM Java from the ground up Open source Clean, simple API Uses Java Collections
  • 14.
    JDOM vs. DOMClasses / Interfaces Java / Many languages Java Collections / Idiosyncratic collections getChildText() and other useful methods / getNextSibling() and other useless methods
  • 15.
    JDOM: The Bestof Both Worlds Clean, easy to use API document.getRootElement().getChild(&quot;book&quot;). getChildText(&quot;title&quot;) Random-access tree model (like DOM) Can use SAX for backing parser Open Source, not Standards Committee Allowed benevolent dictatorship -> clean design
  • 16.
    JDOM Example XMLOutputterout = new XMLOutputter(); out.output( element, System.out ); Or… public void print(Element node) { //recursive method call using JDOM API... out.print('<'); out.print(node.getName()); List attrs = node.getAttributes(); for (int i = 0; i < attrs.size(); i++) { Attribute attr = (Attribute)attrs.get(i); out.print(' '); out.print(attr.getName());out.print(&quot;=\&quot;&quot;); out.print(attr.getValue() ); out.print('&quot;'); } out.print('>'); List children = node.getChildren(); if (children != null) { for (int i = 0; i < children.size(); i++) { print(children.item(i)); } }
  • 17.
    JDOM Example publicElement toElement(User dobj) throws IOException { User obj = (User)dobj; Element element = new Element(&quot;user&quot;); element.addAttribute(&quot;userid&quot;, &quot;&quot;+user.getUserid()); String val; val = obj.getUsername(); if (val != null) { element.addChild(new Element(&quot;username&quot;).setText(val)); } val = obj.getPasswordEncrypted(); if (val != null) { element.addChild(new Element(&quot;passwordEncrypted&quot;).setText(val)); } return element; }
  • 18.
    JDOM Example publicUser fromElement(Element element) throws DataObjectException { List list; User obj = new User(); String value = null; Attribute userid = element.getAttribute(&quot;userid&quot;); if (userid != null) { obj.setUserid( userid.getIntValue() ); } value = element.getChildText(&quot;username&quot;); if (value != null) { obj.setUsername( value ); } value = element.getChildText(&quot;passwordEncrypted&quot;); if (value != null) { obj.setPasswordEncrypted( value ); } return obj; }
  • 19.
    DOMUtils DOM isclunky DOMUtils.java - set of utilities on top of DOM http://www.purpletech.com/code Or just use JDOM
  • 20.
    Event-Based Parsers Scansdocument top to bottom Invokes callback methods Treats XML not like a tree, but like a list (of tags and content) Pro: Not necessary to cache entire document Faster, smaller, simpler Con: must maintain state on your own can't easily backtrack or skip around
  • 21.
    SAX API Grewout of xmldev mailing list (grassroots) Event-based startElement(), endElement() Application intercepts events Not necessary to cache entire document
  • 22.
    Sax API (cont’d)public void startElement(String name, AttributeList atts) { // perform implementation out.print(“Element name is “ + name); out.print(“, first attribute is “ + atts.getName(0) + “, value is “ + atts.getValue(0)); }
  • 23.
    XPath The stuffinside the quotes in XSL Directory-path metaphor for navigating XML document &quot;/curriculum/class[4]/student[first()]&quot; Implementations Resin (Caucho) built on DOM JDOM has one in the &quot;contrib&quot; package Very efficient API for extracting specific info from an XML tree Don't have to walk the DOM or wait for the SAX Con: yet another syntax / language, without full access to Java libraries
  • 24.
    XSL eXtensible StylesheetLanguage transforms one XML document into another XSL file is a list of rules Java XSL processors exist Apache Xalan (not to be confused with Apache Xerces) IBM LotusXSL Resin SAXON XT
  • 25.
    Trouble with XSLIt's a programming language masquerading as a markup language Difficult to debug Turns traditional programming mindset on its head Declarative vs. procedural Recursive, like Prolog Doesn't really separate presentation from code
  • 26.
    JSP JavaServer PagesOutputting XML <% User = loadUser(request.getParameter(&quot;username&quot;)); response.setContentType(&quot;text/xml&quot;); %> <user> <username><%=user.getUsername()%></username> <realname><%=user.getRealname()%></realname> </user> Can also output HTML based on XML parser, naturally (see my &quot;JSP and XML&quot; talk, or http://www.purpletech.com)
  • 27.
    XMLC A radicalsolution to the problem of how to separate presentation template from logic… …to actually separate the presentation template from the logic!
  • 28.
    XMLC Architecture HTML(with ID tags) Java Class (e.g. Servlet) HTML Object (automatically generated) XMLC HTML (dynamically-generated) Setting values Data Reading data
  • 29.
    XMLC Details Open-source(xmlc.enhydra.org) Uses W3C DOM APIs Generates &quot;set&quot; methods per tag Source: <H1 id=&quot;title&quot;>Hello</H1> Code: obj.setElementTitle(&quot;Goodbye&quot;) Output: <H1>Goodbye</H1> Allows graphic designers and database programmers to develop in parallel Works with XML source too
  • 30.
    XML and Javain 2001 Many apps' config files are in XML Ant Tomcat Servlets Several XML-based Sun APIs JAXP JAXM ebXML SOAP (half-heartedly supported  )
  • 31.
    Java XML DocumentationJdox Javadoc -> single XML file http://www.componentregistry.com/ Ready for transformation (e.g. XSL) Java Doclet http://www.sun.com/xml/developers/doclet Javadoc -> multiple XML files (one per class) Cocoon Has alpha XML doclet
  • 32.
    Soapbox: DTDs areirrelevant DTDs describe structure of an unknown document But in most applications, you already know the structure – it's implicit in the code If the document does not conform, there will be a runtime error, and/or corrupt/null data This is as it should be! GIGO. You could have a separate &quot;sanity check&quot; phase, but parsing with validation &quot;on&quot; just slows down your app Useful for large-scale document-processing applications, but not for custom apps or transformations
  • 33.
  • 34.
    Server-Side Java-XML ArchitectureMany possible architectures XML Data Source disk or database or other data feed Java API DOM or SAX or XPath or XSL XSL optional transformation into final HTML, or HTML snippets, or intermediate XML Java Business Logic JavaBeans and/or EJB Java Presentation Code Servlets and/or JSP and/or XMLC
  • 35.
    Server-Side Java-XML ArchitectureJava UI Java Business Logic XML Processors XML Data Sources HTML JSP JavaBeans Servlet EJB DOM, SAX XPath XSL Filesystem XML-savvy RDBMS XML Data Feed
  • 36.
    Server-Side Architecture NotesNote that you can skip any layer, and/or call within layers e.g. XML->XSL->DOM->JSP, or JSP->Servlet->DOM->XML
  • 37.
    Cache as CacheCan Caching is essential Whatever its advantages, XML is slow Cache results on disk and/or in memory
  • 38.
    XML <-> JavaObject Mapping
  • 39.
    XML and ObjectMapping Java -> XML Start with Java class definitions Serialize them - write them to an XML stream Deserialize them - read values in from previously serialized file XML -> Java Start with XML document type Generate Java classes that correspond to elements Classes can read in data, and write in compatible format (shareable)
  • 40.
    Java -> XMLImplementations Java -> XML BeanML Coins / BML Sun's XMLOutputStream/XMLInputStream XwingML (Bluestone) JDOM BeanMapper Quick? JSP (must roll your own)
  • 41.
    BeanML Code (Extract)<?xml version=&quot;1.0&quot;?> <bean class=&quot;java.awt.Panel&quot;> <property name=&quot;background&quot; value=&quot;0xeeeeee&quot;/> <property name=&quot;layout&quot;> <bean class=&quot;java.awt.BorderLayout&quot;/> </property> <add> <bean class=&quot;demos.juggler.Juggler&quot; id=&quot;Juggler&quot;> <property name=&quot;animationRate&quot; value=&quot;50&quot;/> <call-method name=&quot;start&quot;/> </bean> <string>Center</string> </add> … </bean>
  • 42.
    Coins Part ofMDSAX Connect XML Elements and JavaBeans Uses Sax Parser, Docuverse DOM to convert XML into JavaBean Uses BML - (Bindings Markup Language) to define mapping of XML elements to Java Classes
  • 43.
    JDOM BeanMapper Writtenby Alex Chaffee  Default implementation outputs element-only XML, one element per property, named after property Also goes other direction (XML->Java) Doesn't (yet) automatically build bean classes Can set mapping to other custom element names / attributes
  • 44.
    XMLOutputStream/XMLInputStream From someSun engineers http://java.sun.com/products/jfc/tsc/articles/persistence/ May possibly become core, but unclear Serializes Java classes to and from XML Works with existing Java Serialization Not tied to a specific XML representation You can build your own plug-in parser Theoretically, can be used for XML->Java as well
  • 45.
  • 46.
  • 47.
    XML -> JavaImplementations XML -> Java Java-XML Data Binding (JSR 31 / Adelard) IBM XML Master (Xmas) Purple Technology XDB Breeze XML Studio (v2)
  • 48.
    Adelard (Java-XML DataBinding) Java Standards Request 31 Still vapor! (?)
  • 49.
    Castor Implementation ofJSR 31 http://castor.exolab.org Open-source
  • 50.
    IBM XML Master(&quot;XMas&quot;) Not vaporware - it works!!! Same idea as Java-XML Data Binding From IBM Alphaworks Two parts builder application visual XML editor beans
  • 51.
    Brett McLaughlin's DataBinding Package See JavaWorld articles
  • 52.
    Purple Technology XDBIn progress (still vapor) Currently rewriting to use JDOM JDOMBean helps Three parts XML utility classes XML->Java data binding system Caching filesystem-based XML database (with searching)
  • 53.
    Conclusion Java andXML are two great tastes that taste great together
  • 54.
    Resources XML Developments:Elliot Rusty Harold: Café Con Leche - metalab.unc.edu/xml Author, XML Bible Simon St. Laurent www.simonstl.com Author, Building XML Applications General www.xmlinfo.com www.oasis-open.org/cover/xml.html www.xml.com www.jdm.com www.purpletech.com/xml
  • 55.
    Resources: Java-XML ObjectMapping JSR 31 http://java.sun.com/aboutJava/communityprocess/jsr/jsr_031_xmld.html http://java.sun.com/xml/docs/binding/DataBinding.html XMas http://alphaworks.ibm.com/tech/xmas
  • 56.
    Resources XSL: JamesTauber: xsl tutorial: www.xmlsoftware.com/articles/xsl-by-example.html Michael Kay Saxon home.iclweb.com/icl2/mhkay/Saxon.html James Clark XP Parser, XT editor, XSL Transformations W3C Spec
  • 57.
  • 58.
    Thanks To JohnMcGann Daniel Zen David Orchard My Mom