//Set up XMLRenderer to render to a DOM
TransformerHandler handler = env.getTransformerFactory().newTransformerHandler();
DOMResult domResult = new DOMResult();
handler.setResult(domResult);
XMLRenderer renderer = new XMLRenderer();
renderer.setContentHandler(handler);
FOUserAgent userAgent = createUserAgent();
userAgent.setRendererOverride(renderer);
renderer.setUserAgent(userAgent);
FontInfo fontInfo = new FontInfo();
AreaTreeModel treeModel = new RenderPagesModel(userAgent,
MimeConstants.MIME_FOP_AREA_TREE, fontInfo, null);
parser.parse(src, treeModel, userAgent);