[Previous slide] [Next slide] Moving to XML

Create a document object

    // get a handle on a DOM implementation...
    DOMImplementation di = DOMStub.getDOMImplementation( context);
    // and use it to create a document object
    Document doc = di.createDocument( getNamespaceURI( context), 
						  rootName, doctype);
      

DOMStub is a Jacquard utility class which gets hold of whatever DOM implementation is available. If you don't use Jacquard you'll have to instantiate a DOM implementation for yourself.