Here you can find the source of getSAXParser()
Parameter | Description |
---|---|
ParserConfigurationException | If there are any error with the SAX parser creation |
SAXException | If there are any error with the SAX parser creation |
public static SAXParser getSAXParser() throws ParserConfigurationException, SAXException
//package com.java2s; /*//from w ww. j a va 2s. c o m * Copyright Paolo Dragone 2014. * Copyright Alessandro Ronca 2014. * * This file is part of Wiktionary Ontology. * * Wiktionary Ontology is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Wiktionary Ontology is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Wiktionary Ontology. If not, see <http://www.gnu.org/licenses/>. */ import org.xml.sax.SAXException; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; public class Main { /** * Creates a new SAXParser. * * @return A new SAXParser * @throws ParserConfigurationException If there are any error with the SAX parser creation * @throws SAXException If there are any error with the SAX parser creation */ public static SAXParser getSAXParser() throws ParserConfigurationException, SAXException { SAXParserFactory factory = SAXParserFactory.newInstance(); return factory.newSAXParser(); } }