/***
DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document document = builder.parse(getInputStream());
***/
Config config = new Config("schema", getInputStream(), "/schema/");
Document document = config.getDocument();
XPath xpath = config.getXPath();
Node nd = (Node) xpath.evaluate("/schema/@name", document, XPathConstants.NODE);
if (nd==null) {
log.warning("schema has no name!");
} else {
name = nd.getNodeValue();
log.info("Schema name=" + name);
}
version = config.getFloat("/schema/@version", 1.0f);
String expression = "/schema/types/fieldtype | /schema/types/fieldType";
NodeList nodes = (NodeList) xpath.evaluate(expression, document, XPathConstants.NODESET);