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 void
disableExternalEntities
(SAXParserFactory factory) The purpose of this method is to prevent vulnerabilities related to XXE (XML external entity injection).private static SAXParser
private static RuntimeException
static SimpleXmlNode
static SimpleXmlNode
parseInputStream
(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.
-