Class XMLUtil
java.lang.Object
com.inductiveautomation.ignition.common.XMLUtil
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidcloseElement(PrintWriter out, String element) Writes </element>static DocumentBuilderFactoryThe createSafeDocumentBuilderFactory() method returns a new DocumentBuilderFactory Instance that has been configured to prevent XXE attacks possible through weakly configured XML parsers processing external entities.static SAXParserFactoryThe createSafeSAXParserFactory() method returns a new DocumentBuilderFactory Instance that has been configured to prevent XXE attacks possible through weakly configured XML parsers processing external entities.static TransformerFactorystatic XMLReaderThe createSafeXMLReader() method returns a new XMLReader Instance that has been configured to prevent XXE attacks possible through weakly configured XML parsers processing external entities.static XMLReadercreateSafeXMLReader(String className) The createSafeXMLReader() method returns a new XMLReader Instance that has been configured to prevent XXE attacks possible through weakly configured XML parsers processing external entities.static voidstatic voidopenElement(PrintWriter out, String element) Writes <element>static voidprintXMLHead(PrintWriter out) static voidprintXMLHead(Writer out) static voidstatic voidprintXMLHead(Formatter out) static Stringstatic voidsetSafetyFeatures(XMLReader reader) Sets safety features on the provided XMLReader instancestatic voidwriteElement(PrintWriter out, String element, String contents) Writes <element>contents</element> , quoting the contents.
- 
Field Details- 
dateFormat
 
- 
- 
Constructor Details- 
XMLUtilpublic XMLUtil()
 
- 
- 
Method Details- 
createSafeDocumentBuilderFactoryThe createSafeDocumentBuilderFactory() method returns a new DocumentBuilderFactory Instance that has been configured to prevent XXE attacks possible through weakly configured XML parsers processing external entities.See: https://www.owasp.org/index.php/XML_External_Entity_%28XXE%29_Processing for more info 
- 
createSafeTransformerFactory
- 
createSafeSAXParserFactoryThe createSafeSAXParserFactory() method returns a new DocumentBuilderFactory Instance that has been configured to prevent XXE attacks possible through weakly configured XML parsers processing external entities.See: https://www.owasp.org/index.php/XML_External_Entity_%28XXE%29_Processing for more info 
- 
createSafeXMLReaderThe createSafeXMLReader() method returns a new XMLReader Instance that has been configured to prevent XXE attacks possible through weakly configured XML parsers processing external entities.See: https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html#xmlreader for more info - Throws:
- SAXException
 
- 
createSafeXMLReaderThe createSafeXMLReader() method returns a new XMLReader Instance that has been configured to prevent XXE attacks possible through weakly configured XML parsers processing external entities.See: https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html#xmlreader for more info Calls XMLReaderFactory.createXMLReader(String)and provides the given className- Throws:
- SAXException
 
- 
setSafetyFeaturesSets safety features on the provided XMLReader instanceSee: https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html#xmlreader for more info 
- 
printXMLHead- Throws:
- IOException
 
- 
printXMLHead
- 
printXMLHead
- 
printXMLHead
- 
openElementWrites <element>
- 
closeElementWrites </element>
- 
writeElementWrites <element>contents</element> , quoting the contents. If contents is null, writes <element/>
- 
main
- 
quoteCharacters
 
-