namespaceURIInterning = false;
lookAheadToken = -1;
}
private OMDocument createDocument() {
OMDocument document = omfactory.createOMDocument(this);
if (charEncoding != null) {
document.setCharsetEncoding(charEncoding);
}
if (parser.getEventType() == XMLStreamConstants.START_DOCUMENT) {
document.setXMLVersion(parser.getVersion());
document.setStandalone(parser.isStandalone() ? "yes" : "no");
} else {
// We allow creating a StAXOMWrapper from a parser in state START_ELEMENT. In that
// case, we must not call getVersion or isStandalone since this is forbidden by the
// StAX specs. Set some reasonable defaults.
document.setXMLVersion("1.0");
document.setStandalone("yes");
}
return document;
}