Element outFilterElem = factory.writeDatasetScanFilter( inFilter );
// Write the resulting element to string.
ByteArrayOutputStream inBaos = new ByteArrayOutputStream();
ByteArrayOutputStream outBaos = new ByteArrayOutputStream();
XMLOutputter fmt = new XMLOutputter( org.jdom.output.Format.getPrettyFormat() );
try
{
fmt.output( inFilterElem, inBaos );
fmt.output( outFilterElem, outBaos );
}
catch ( IOException e )
{
fail( "Failed to write JDOM Elements to byte array: " + e.getMessage());
}