org.foray.common.sax
Class SaxParser

java.lang.Object
  extended by org.foray.common.sax.SaxParser

public final class SaxParser
extends Object

Utility class that provides information about an XML Parser.


Method Summary
static XMLReader createSax2Parser()
          Creates a SAX2 parser with a standard configuration.
static String getParserClassName()
          Returns the name of the SAX Parser class that is found in the classpath.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getParserClassName

public static String getParserClassName()
Returns the name of the SAX Parser class that is found in the classpath.

Returns:
The name of the SAX Parser class that is found in the classpath.

createSax2Parser

public static XMLReader createSax2Parser()
                                  throws SAXException,
                                         ParserConfigurationException
Creates a SAX2 parser with a standard configuration. Specifically, the parser is namespace-aware and has the "namespace-prefixes" feature set to true.

Returns:
The newly-created SAX2 parser.
Throws:
SAXException - For errors creating the parser.
ParserConfigurationException - For errors configuring the parser.


Copyright © 2017. All rights reserved.