FileDocCategorySizeDatePackage
SAXParser.javaAPI DocJava SE 5 API5853Fri Aug 26 14:55:54 BST 2005com.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.37 2004/02/17 07:14:49 neeraj 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.XIncludeParserConfiguration"
            ));

        // 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