org.apache.poi.util
Class SAXHelper

java.lang.Object
  extended by org.apache.poi.util.SAXHelper

public final class SAXHelper
extends java.lang.Object

Provides handy methods for working with SAX parsers and readers


Method Summary
static org.dom4j.io.SAXReader getSAXReader()
          Creates a new DOM4J SAXReader, with sensible defaults
static org.xml.sax.XMLReader newXMLReader()
          Creates a new SAX XMLReader, with sensible defaults
static org.dom4j.Document readSAXDocument(java.io.InputStream inp)
          Parses the given stream via the default (sensible) SAX Reader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newXMLReader

public static org.xml.sax.XMLReader newXMLReader()
                                          throws org.xml.sax.SAXException,
                                                 javax.xml.parsers.ParserConfigurationException
Creates a new SAX XMLReader, with sensible defaults

Throws:
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException

getSAXReader

public static org.dom4j.io.SAXReader getSAXReader()
                                           throws org.dom4j.DocumentException
Creates a new DOM4J SAXReader, with sensible defaults

Throws:
org.dom4j.DocumentException

readSAXDocument

public static org.dom4j.Document readSAXDocument(java.io.InputStream inp)
                                          throws org.dom4j.DocumentException
Parses the given stream via the default (sensible) SAX Reader

Parameters:
inp - Stream to read the XML data from
Returns:
the SAX processed Document
Throws:
org.dom4j.DocumentException


Copyright 2014 The Apache Software Foundation or its licensors, as applicable.