in src/main/java/org/apache/commons/scxml2/io/SCXMLReader.java [519:547]
private static SCXML readDocument(final XMLStreamReader reader, final Configuration configuration)
throws IOException, ModelException, XMLStreamException {
final SCXML scxml = new SCXML();
scxml.setPathResolver(configuration.pathResolver);
while (reader.hasNext()) {
String name, nsURI;
switch (reader.next()) {
case XMLStreamConstants.START_ELEMENT:
nsURI = reader.getNamespaceURI();
name = reader.getLocalName();
if (SCXMLConstants.XMLNS_SCXML.equals(nsURI)) {
if (SCXMLConstants.ELEM_SCXML.equals(name)) {
readSCXML(reader, configuration, scxml);
} else {
reportIgnoredElement(reader, configuration, "DOCUMENT_ROOT", nsURI, name);
}
} else {
reportIgnoredElement(reader, configuration, "DOCUMENT_ROOT", nsURI, name);
}
break;
case XMLStreamConstants.NAMESPACE:
System.err.println(reader.getNamespaceCount());
break;
default:
}
}
return scxml;
}