public class XMLUtils extends Object
| Constructor and Description |
|---|
XMLUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Document |
buildDocumentFromFile(File xmlFile)
Build a Document from a file
|
static Document |
buildDocumentFromInputStream(InputStream is)
Build a document from a InputStream.
|
static DocumentBuilderFactory |
getSecuredDocumentBuilderFactory()
Create DocumentBuilderFactory with the XXE and XEE prevention measurements.
|
public static Document buildDocumentFromFile(File xmlFile) throws Exception
xmlFile - fileException - if an error occurspublic static Document buildDocumentFromInputStream(InputStream is) throws Exception
is - InputStreamException - if an error occurspublic static DocumentBuilderFactory getSecuredDocumentBuilderFactory() throws ParserConfigurationException
ParserConfigurationException - When failed to load XML Processor Features
external-general-entities, external-parameter-entities, nonvalidating/load-external-dtd.Copyright © 2025 WSO2. All rights reserved.