Code example for DOMImplementation

Methods: createDocument, createDocumentType

0
		DOMImplementation domImpl = documentBuilder.getDOMImplementation();
 
		// We needed to reference using the full class name here because we already have  
		//  a class named "DocumentType" 
		 
		org.w3c.dom.DocumentType doctype = domImpl.createDocumentType(
		       "plist", 
		       "-//Apple Computer//DTD PLIST 1.0//EN", 
		       "http://www.apple.com/DTDs/PropertyList-1.0.dtd"); 
 
		return domImpl.createDocument(null, "plist", doctype);
	} 
 
 
	private void buildDOM()  { 
 
		Element plist = this.document.getDocumentElement();
		plist.setAttribute("version","1.0");		
 
		// Open the top level dictionary, <dict>