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