FileDocCategorySizeDatePackage
SAXParser.javaAPI DocApache Xerces 3.0.13966Fri Sep 14 20:33:52 BST 2007org.apache.xerces.parsers

SAXParser

public 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.
author
Arnaud Le Hors, IBM
author
Andy Clark, IBM
version
$Id: SAXParser.java 447239 2006-09-18 05:08:26Z mrglavas $

Fields Summary
protected static final String
NOTIFY_BUILTIN_REFS
Feature identifier: notify built-in refereces.
private static final String[]
RECOGNIZED_FEATURES
Recognized features.
protected static final String
SYMBOL_TABLE
Property identifier: symbol table.
protected static final String
XMLGRAMMAR_POOL
Property identifier: XML grammar pool.
private static final String[]
RECOGNIZED_PROPERTIES
Recognized 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);
        }

    
Methods Summary