Package org.apache.poi.util
Class XMLHelper
- java.lang.Object
-
- org.apache.poi.util.XMLHelper
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static javax.xml.parsers.DocumentBuilderFactory
getDocumentBuilderFactory()
Creates a new DocumentBuilderFactory, with sensible defaultsstatic javax.xml.parsers.SAXParserFactory
getSaxParserFactory()
static javax.xml.validation.SchemaFactory
getSchemaFactory()
static javax.xml.transform.TransformerFactory
getTransformerFactory()
static javax.xml.parsers.DocumentBuilder
newDocumentBuilder()
Creates a new document builder, with sensible defaultsstatic javax.xml.transform.Transformer
newTransformer()
static javax.xml.stream.XMLEventFactory
newXMLEventFactory()
Creates a new StAX XMLEventFactory, with sensible defaultsstatic javax.xml.stream.XMLInputFactory
newXMLInputFactory()
Creates a new StAX XMLInputFactory, with sensible defaultsstatic javax.xml.stream.XMLOutputFactory
newXMLOutputFactory()
Creates a new StAX XMLOutputFactory, with sensible defaultsstatic org.xml.sax.XMLReader
newXMLReader()
Creates a new SAX XMLReader, with sensible defaults
-
-
-
Method Detail
-
getDocumentBuilderFactory
public static javax.xml.parsers.DocumentBuilderFactory getDocumentBuilderFactory()
Creates a new DocumentBuilderFactory, with sensible defaults
-
newDocumentBuilder
public static javax.xml.parsers.DocumentBuilder newDocumentBuilder()
Creates a new document builder, with sensible defaults- Throws:
java.lang.IllegalStateException
- If creating the DocumentBuilder fails, e.g. due toParserConfigurationException
.
-
getSaxParserFactory
public static javax.xml.parsers.SAXParserFactory getSaxParserFactory()
-
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
-
newXMLInputFactory
public static javax.xml.stream.XMLInputFactory newXMLInputFactory()
Creates a new StAX XMLInputFactory, with sensible defaults
-
newXMLOutputFactory
public static javax.xml.stream.XMLOutputFactory newXMLOutputFactory()
Creates a new StAX XMLOutputFactory, with sensible defaults
-
newXMLEventFactory
public static javax.xml.stream.XMLEventFactory newXMLEventFactory()
Creates a new StAX XMLEventFactory, with sensible defaults
-
getTransformerFactory
public static javax.xml.transform.TransformerFactory getTransformerFactory()
-
newTransformer
public static javax.xml.transform.Transformer newTransformer() throws javax.xml.transform.TransformerConfigurationException
- Throws:
javax.xml.transform.TransformerConfigurationException
-
getSchemaFactory
public static javax.xml.validation.SchemaFactory getSchemaFactory()
-
-