Code example for DOMImplementation

Methods: createDocument

0
		} 
	} 
 
	public void createNewDocument() { 
		DOMImplementation dom = docBuild.getDOMImplementation();
		doc = dom.createDocument(null, TAG, null);
		holder = doc.createElement("ElementHolder");
	} 
 
	public void loadExistingDocument(String file) {
		SAXParser saxp = null;
		XMLReader parser = null;
 
		// 
		// Create the parser 
		// 
		try { 
			saxp = SAXParserFactory.newInstance().newSAXParser();
			parser = saxp.getXMLReader();
			parser.setContentHandler(this);
			parser.setErrorHandler(this);