Code example for XMLReader

Methods: setContentHandler, setDTDHandler, setErrorHandler

0
	//output.print("\n" + indent + "<" + qName); 
	output.print("<" + qName);
	int nAttr = attributes.getLength();
	for (int i=0; i < nAttr; i++) {
	    output.print(" " + attributes.getQName(i) + "=\"" + attributes.getValue(i) + "\"");
	} 
	output.print(">");
	//indent = indent + "  "; 
    } 
 
    /**  
     * Close the element. 
     */ 
 
    public void endElement (String uri, String localName, String qName) throws SAXException {
	debug("Received endElement event:" + qName);
	//indent = indent.substring(0, indent.length() - 2); 
	output.print("</" + qName + ">");
    } 
 
    /**