Package io.vertigo.core.util
Class XmlUtil
java.lang.Object
io.vertigo.core.util.XmlUtil
XSD Validation.
- Author:
- pchretien
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidsecureXmlXXEByOwasp(DocumentBuilderFactory documentBuilderFactory) Secure XML parser with OWASP recommendations.static voidsecureXmlXXEByOwasp(SAXParserFactory factory) Secure XML parser with OWASP recommendations.static voidSecure XML parser with OWASP recommendations.static voidsecureXmlXXEByOwasp(SchemaFactory schemaFactory) Secure XML parser with OWASP recommendations.static voidvalidateXmlByXsd(URL xml, URL xsd) Util to validate XML with a XSD.
-
Method Details
-
secureXmlXXEByOwasp
public static void secureXmlXXEByOwasp(SchemaFactory schemaFactory) throws SAXNotRecognizedException, SAXNotSupportedException Secure XML parser with OWASP recommendations.- Parameters:
schemaFactory- SchemaFactory- Throws:
SAXNotRecognizedExceptionSAXNotSupportedException
-
secureXmlXXEByOwasp
public static void secureXmlXXEByOwasp(SAXParserFactory factory) throws SAXNotRecognizedException, SAXNotSupportedException, ParserConfigurationException Secure XML parser with OWASP recommendations.- Parameters:
schemaFactory- SchemaFactory- Throws:
ParserConfigurationExceptionSAXNotRecognizedExceptionSAXNotSupportedException
-
secureXmlXXEByOwasp
public static void secureXmlXXEByOwasp(TransformerFactory tf) throws TransformerConfigurationException Secure XML parser with OWASP recommendations.- Parameters:
tf- TransformerFactory- Throws:
TransformerConfigurationException
-
secureXmlXXEByOwasp
public static void secureXmlXXEByOwasp(DocumentBuilderFactory documentBuilderFactory) throws ParserConfigurationException Secure XML parser with OWASP recommendations.- Parameters:
domFactory- DocumentBuilderFactory- Throws:
ParserConfigurationException
-
validateXmlByXsd
Util to validate XML with a XSD.- Parameters:
xml- XML to validatexsd- XSD
-