private Node getSchemaNode ( String filePath ) throws IOException , SAXException , ParserConfigurationException { Document doc = DocumentBuilderFactory . newInstance ( ) . newDocumentBuilder ( ) . parse ( filePath ) ; doc . getDocumentElement ( ) . normalize ( ) ; return doc . getFirstChild ( ) ; }
This function uses DOM to obtain a list of nodes from a XSD file .