DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
//factory.setFeature("http://xml.org/sax/features/namespace-prefixes", false);
DocumentBuilder builder = factory.newDocumentBuilder();
// disable DTD loading (bug #36897)
builder.setEntityResolver(new RejectingEntityResolver());
Document document = builder.parse(in);
Element doc = document.getDocumentElement();
if (!doc.getNodeName().equals("workspaceFilter")) {
throw new ConfigurationException("<workspaceFilter> expected.");
}