Methods Summary |
---|
public org.dom4j.io.DOMReader | createDOMReader()Create a dom4j DOMReader
if (domReader==null) domReader = new DOMReader();
return domReader;
|
public org.dom4j.io.SAXReader | createSAXReader(java.lang.String file, java.util.List errorsList, org.xml.sax.EntityResolver entityResolver)Create a dom4j SAXReader which will append all validation errors
to errorList
if (saxReader==null) saxReader = new SAXReader();
saxReader.setEntityResolver(entityResolver);
saxReader.setErrorHandler( new ErrorLogger(file, errorsList) );
saxReader.setMergeAdjacentText(true);
saxReader.setValidation(true);
return saxReader;
|
public static void | dump(org.dom4j.Element element)
try {
// try to "pretty print" it
OutputFormat outformat = OutputFormat.createPrettyPrint();
XMLWriter writer = new XMLWriter( System.out, outformat );
writer.write( element );
writer.flush();
System.out.println( "" );
}
catch( Throwable t ) {
// otherwise, just dump it
System.out.println( element.asXML() );
}
|
public static org.dom4j.Element | generateDom4jElement(java.lang.String elementName)
return DocumentFactory.getInstance().createElement( elementName );
|