src/main/java/org/xmlet/xsdparser/core/XsdParser.java
private void parseFile(String filePath) {
        //https://www.mkyong.com/java/how-to-read-xml-file-in-java-dom-parser/
        try {
            if (!new File(filePath).exists()){
                throw new FileNotFoundException();
            }

            Node schemaNode = getSchemaNode(filePath);

            if (isXsdSchema(schemaNode)){
                XsdSchema.parse(this, schemaNode);
            } else {
                throw new ParsingException("The top level element of a XSD file should be the xsd:schema node.");
            }
        } catch (SAXException | IOException | ParserConfigurationException e) {
            Logger.getAnonymousLogger().log(Level.SEVERE, "Exception while parsing.", e);
        }
    }
private void parseFile(String filePath) {
        //https://www.mkyong.com/java/how-to-read-xml-file-in-java-dom-parser/
        try {
            if (!new File(filePath).exists()){
                throw new FileNotFoundException();
            }

            Node schemaNode = getSchemaNode(filePath);

            if (isXsdSchema(schemaNode)){
                XsdSchema.parse(this, schemaNode);
            } else {
                throw new ParsingException("The top level element of a XSD file should be the xsd:schema node.");
            }
        } catch (SAXException | IOException | ParserConfigurationException e) {
            Logger.getAnonymousLogger().log(Level.SEVERE, "Exception while parsing.", e);
        }
    }
private void parseFile ( String filePath ) { //https://www.mkyong.com/java/how-to-read-xml-file-in-java-dom-parser/ try { if ( ! new File ( filePath ) . exists ( ) ) { throw new FileNotFoundException ( ) ; } Node schemaNode = getSchemaNode ( filePath ) ; if ( isXsdSchema ( schemaNode ) ) { XsdSchema . parse ( this , schemaNode ) ; } else { throw new ParsingException ( "The top level element of a XSD file should be the xsd:schema node." ) ; } } catch ( SAXException | IOException | ParserConfigurationException e ) { Logger . getAnonymousLogger ( ) . log ( Level . SEVERE , "Exception while parsing." , e ) ; } }
Parses a XSD file and all its containing XSD elements. This code iterates on the nodes and parses the supported
ones. The supported types are all the XSD types that have their tag present in the {@link XsdParser#parseMappers}
field.
@param filePath The path to the XSD file.
Parses a XSD file and all its containing XSD elements . This code iterates on the nodes and parses the supported ones . The supported types are all the XSD types that have their tag present in the {