Package fr.gouv.vitam.common.xml

# Class SecureXMLFactoryUtils

java.lang.Object
fr.gouv.vitam.common.xml.SecureXMLFactoryUtils

public final class SecureXMLFactoryUtils extends Object
Helper for secure xml factory initialization. See Java API for XML Processing (JAXP) Security Guide See OWASP XML External Entity Prevention Cheat Sheet See XML External entity prevention for Java

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static DocumentBuilderFactory`
  `createSecureDocumentBuilderFactory()`
  `static SAXParserFactory`
  `createSecureSAXParserFactory()`
  `static XMLEventReader`
  `createSecureXMLEventReader(InputStream inputStream)`
  `static XMLStreamReader`
  `createSecureXMLStreamReader(InputStream inputStream)`
  `static XMLStreamReader`
  `createSecureXMLStreamReader(Reader reader)`
  `static void`
  `validateXmlFile(File xmlFile)`
  `static void`
  `xsltTransform(InputStream xsltInputStream, InputStream xmlInputStream, OutputStream xmlOutputStream)`

  ### Methods inherited from class java.lang.Object

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

- ## Method Details

  - ### createSecureXMLEventReader

    public static XMLEventReader createSecureXMLEventReader(InputStream inputStream) throws XMLStreamException
    Throws:
      `XMLStreamException`

  - ### createSecureXMLStreamReader

    public static XMLStreamReader createSecureXMLStreamReader(InputStream inputStream) throws XMLStreamException
    Throws:
      `XMLStreamException`

  - ### createSecureXMLStreamReader

    public static XMLStreamReader createSecureXMLStreamReader(Reader reader) throws XMLStreamException
    Throws:
      `XMLStreamException`

  - ### createSecureDocumentBuilderFactory

    public static DocumentBuilderFactory createSecureDocumentBuilderFactory()

  - ### createSecureSAXParserFactory

    public static SAXParserFactory createSecureSAXParserFactory()

  - ### validateXmlFile

    public static void validateXmlFile(File xmlFile) throws SAXException
    Throws:
      `SAXException`

  - ### xsltTransform

    public static void xsltTransform(InputStream xsltInputStream, InputStream xmlInputStream, OutputStream xmlOutputStream) throws TransformerException
    Throws:
      `TransformerException`