this.fomfactory = factory;
String enc = parser.getCharacterEncodingScheme();
document.setCharsetEncoding(enc != null ? enc : "utf-8");
document.setXMLVersion(parser.getVersion() != null ? parser.getVersion() : "1.0");
if (parserOptions != null) {
ParseFilter parseFilter = parserOptions.getParseFilter();
if (parseFilter != null) {
ignoreWhitespace = parseFilter.getIgnoreWhitespace();
ignoreComments = parseFilter.getIgnoreComments();
ignorePI = parseFilter.getIgnoreProcessingInstructions();
}
}
}