}
protected Object loadDocument(InputStream in) throws Exception {
// Jaxen's unit tests assume that whitespace in the prolog/epilog is not
// represented in the tree (as in DOM), so we need to filter these events.
XMLStreamReader reader = new RootWhitespaceFilter(
StAXUtils.createXMLStreamReader(in));
return OMXMLBuilderFactory.createStAXOMBuilder(metaFactory.getOMFactory(), reader).getDocument();
}