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(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(SymbolTable symbolTable)Constructs a SAX parser using the specified symbol table.
this(symbolTable, null);
| public SAXParser(SymbolTable symbolTable, XMLGrammarPool grammarPool)Constructs a SAX parser using the specified symbol table and
grammar pool.
super((XMLParserConfiguration)ObjectFactory.createObject(
"com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration",
"com.sun.org.apache.xerces.internal.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);
}
|
|