This method loads the supplied XML document, uses
the custom {@link ORAElement}
via the
{@link CustomJDOMFactory}
, and then
writes out the customized document to the supplied
output file.
// Create builder and set up factory
SAXBuilder builder = new SAXBuilder();
JDOMFactory factory = new CustomJDOMFactory();
builder.setFactory(factory);
// Build document
Document doc = builder.build(inputFilename);
// Output document
XMLOutputter outputter = new XMLOutputter();
outputter.output(doc, new FileWriter(new File(outputFilename)));