SAXParserpublic class SAXParser extends AbstractSAXParser This is the main Xerces SAX parser class. It uses the abstract SAX
parser with a document scanner, a dtd scanner, and a validator, as
well as a grammar pool. |
Fields Summary |
---|
protected static final String | NOTIFY_BUILTIN_REFSFeature identifier: notify built-in refereces. | private static final String[] | RECOGNIZED_FEATURESRecognized features. | protected static final String | SYMBOL_TABLEProperty identifier: symbol table. | protected static final String | XMLGRAMMAR_POOLProperty identifier: XML grammar pool. | private static final String[] | RECOGNIZED_PROPERTIESRecognized properties. |
Constructors Summary |
---|
public SAXParser(org.apache.xerces.xni.parser.XMLParserConfiguration config)Constructs a SAX parser using the specified parser configuration.
//
// Constructors
//
super(config);
| public SAXParser()Constructs a SAX parser using the dtd/xml schema parser configuration.
this(null, null);
| public SAXParser(org.apache.xerces.util.SymbolTable symbolTable)Constructs a SAX parser using the specified symbol table.
this(symbolTable, null);
| public SAXParser(org.apache.xerces.util.SymbolTable symbolTable, org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)Constructs a SAX parser using the specified symbol table and
grammar pool.
super((XMLParserConfiguration)ObjectFactory.createObject(
"org.apache.xerces.xni.parser.XMLParserConfiguration",
"org.apache.xerces.parsers.XIncludeAwareParserConfiguration"
));
// set features
fConfiguration.addRecognizedFeatures(RECOGNIZED_FEATURES);
fConfiguration.setFeature(NOTIFY_BUILTIN_REFS, true);
// set properties
fConfiguration.addRecognizedProperties(RECOGNIZED_PROPERTIES);
if (symbolTable != null) {
fConfiguration.setProperty(SYMBOL_TABLE, symbolTable);
}
if (grammarPool != null) {
fConfiguration.setProperty(XMLGRAMMAR_POOL, grammarPool);
}
|
|