1 /* 2 * reserved comment block 3 * DO NOT REMOVE OR ALTER! 4 */ 5 /* 6 * Copyright 2001-2005 The Apache Software Foundation. 7 * 8 * Licensed under the Apache License, Version 2.0 (the "License"); 9 * you may not use this file except in compliance with the License. 10 * You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, software 15 * distributed under the License is distributed on an "AS IS" BASIS, 16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 * See the License for the specific language governing permissions and 18 * limitations under the License. 19 */ 20 21 package com.sun.org.apache.xerces.internal.parsers; 22 23 import com.sun.org.apache.xerces.internal.impl.Constants; 24 import com.sun.org.apache.xerces.internal.util.SymbolTable; 25 import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool; 26 import com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration; 27 28 /** 29 * This is a concrete vanilla XML parser class. It uses the abstract parser 30 * with either a BasicConfiguration object or the one specified by the 31 * application. 32 * 33 * @author Arnaud Le Hors, IBM 34 * @author Andy Clark, IBM 35 * 36 */ 37 public class XMLDocumentParser 38 extends AbstractXMLDocumentParser { 39 40 // 41 // Constructors 42 // 43 44 /** 45 * Constructs a document parser using the default basic parser 46 * configuration. 47 */ 48 public XMLDocumentParser() { 49 super(new XIncludeAwareParserConfiguration()); 50 } // <init>() 51 52 /** 53 * Constructs a document parser using the specified parser configuration. 54 */ 55 public XMLDocumentParser(XMLParserConfiguration config) { 56 super(config); 57 } // <init>(ParserConfiguration) 58 59 /** 60 * Constructs a document parser using the specified symbol table. 61 */ 62 public XMLDocumentParser(SymbolTable symbolTable) { 63 super(new XIncludeAwareParserConfiguration()); 64 fConfiguration.setProperty(Constants.XERCES_PROPERTY_PREFIX+Constants.SYMBOL_TABLE_PROPERTY, symbolTable); 65 } // <init>(SymbolTable) 66 67 /** 68 * Constructs a document parser using the specified symbol table and 69 * grammar pool. 70 */ 71 public XMLDocumentParser(SymbolTable symbolTable, 72 XMLGrammarPool grammarPool) { 73 super(new XIncludeAwareParserConfiguration()); 74 fConfiguration.setProperty(Constants.XERCES_PROPERTY_PREFIX+Constants.SYMBOL_TABLE_PROPERTY, symbolTable); 75 fConfiguration.setProperty(Constants.XERCES_PROPERTY_PREFIX+Constants.XMLGRAMMAR_POOL_PROPERTY, grammarPool); 76 } 77 78 } // class XMLDocumentParser