Package gw.xml.simple
Class SimpleXmlParser
java.lang.Object
gw.xml.simple.SimpleXmlParser
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voiddisableExternalEntities(SAXParserFactory factory) The purpose of this method is to prevent vulnerabilities related to XXE (XML external entity injection).private static SAXParserprivate static RuntimeExceptionstatic SimpleXmlNodestatic SimpleXmlNodeparseInputStream(InputStream stream) static SimpleXmlNode
-
Field Details
-
_saxParser
-
-
Constructor Details
-
SimpleXmlParser
private SimpleXmlParser()
-
-
Method Details
-
parseFile
-
parseInputStream
-
parseString
-
maybeWrapException
-
makeSAXParser
-
disableExternalEntities
private static void disableExternalEntities(SAXParserFactory factory) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException The purpose of this method is to prevent vulnerabilities related to XXE (XML external entity injection). Although the nature of XML parsing in this case is such that it is _not_ vulnerable, we configure the parser in this way to appease those who demand zero alarm results from static analysis tooling such as Veracode.
-