XmlUtil (Apache OpenNLP Tools 2.5.9 API)
Description: declaration: package: opennlp.tools.util, class: XmlUtil

# Class XmlUtil

java.lang.Object
opennlp.tools.util.XmlUtil

public class XmlUtil extends Object

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `XmlUtil()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static DocumentBuilder`
  `createDocumentBuilder()`
  Create a new `DocumentBuilder` which processes XML securely.
  `static SAXParser`
  `createSaxParser()`
  Create a new `SAXParser` which processes XML securely.

  ### Methods inherited from class Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### XmlUtil

    public XmlUtil()

- ## Method Details

  - ### createDocumentBuilder

    public static DocumentBuilder createDocumentBuilder()
    Create a new `DocumentBuilder` which processes XML securely.
    Returns:
      A valid `DocumentBuilder` instance.
    Throws:
      `IllegalStateException` - Thrown if errors occurred creating the builder.

  - ### createSaxParser

    public static SAXParser createSaxParser()
    Create a new `SAXParser` which processes XML securely.
    Returns:
      A valid `SAXParser` instance.
    Throws:
      `IllegalStateException` - Thrown if errors occurred creating the parser.