1 16 17 package org.apache.xerces.parsers; 18 19 import org.apache.xerces.impl.Constants; 20 import org.apache.xerces.util.SymbolTable; 21 import org.apache.xerces.xni.grammars.XMLGrammarPool; 22 import org.apache.xerces.xni.parser.XMLParserConfiguration; 23 24 34 public class XMLDocumentParser 35 extends AbstractXMLDocumentParser { 36 37 41 45 public XMLDocumentParser() { 46 super((XMLParserConfiguration)ObjectFactory.createObject( 47 "org.apache.xerces.xni.parser.XMLParserConfiguration", 48 "org.apache.xerces.parsers.XIncludeAwareParserConfiguration" 49 )); 50 } 52 55 public XMLDocumentParser(XMLParserConfiguration config) { 56 super(config); 57 } 59 62 public XMLDocumentParser(SymbolTable symbolTable) { 63 super((XMLParserConfiguration)ObjectFactory.createObject( 64 "org.apache.xerces.xni.parser.XMLParserConfiguration", 65 "org.apache.xerces.parsers.XIncludeAwareParserConfiguration" 66 )); 67 fConfiguration.setProperty(Constants.XERCES_PROPERTY_PREFIX+Constants.SYMBOL_TABLE_PROPERTY, symbolTable); 68 } 70 74 public XMLDocumentParser(SymbolTable symbolTable, 75 XMLGrammarPool grammarPool) { 76 super((XMLParserConfiguration)ObjectFactory.createObject( 77 "org.apache.xerces.xni.parser.XMLParserConfiguration", 78 "org.apache.xerces.parsers.XIncludeAwareParserConfiguration" 79 )); 80 fConfiguration.setProperty(Constants.XERCES_PROPERTY_PREFIX+Constants.SYMBOL_TABLE_PROPERTY, symbolTable); 81 fConfiguration.setProperty(Constants.XERCES_PROPERTY_PREFIX+Constants.XMLGRAMMAR_POOL_PROPERTY, grammarPool); 82 } 83 84 } | Popular Tags |