FileDocCategorySizeDatePackage
SAXParser.javaAPI DocJava SE 6 API3795Tue Jun 10 00:22:50 BST 2008com.sun.org.apache.xerces.internal.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,v 1.2.6.1 2005/09/06 13:45:43 sunithareddy Exp $

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(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);
        }

    
Methods Summary