Package com.norconex.commons.lang.xml
Class XmlUtil
java.lang.Object
com.norconex.commons.lang.xml.XmlUtil
Utility XML-related methods. When applicable:
- Uses XML Schema version 1.1.
- Addresses XML security vulnerabilities (XXE).
- Wraps checked exceptions in a runtime
XmlException.
- Since:
- 2.0.0
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic DocumentBuilderFactorystatic SAXParserFactorystatic SchemaFactorystatic ValidatorcreateSchemaValidator(Schema schema) static XMLEventReaderCreates anXMLEventReaderfrom the supplied object representing XML.static XMLInputFactorystatic XMLReader
-
Field Details
-
W3C_XML_SCHEMA_NS_URI_1_1
- See Also:
-
-
Method Details
-
createSchemaValidator
-
createSchemaFactory
-
createXMLReader
-
createDocumentBuilderFactory
-
createSaxParserFactory
-
createXMLInputFactory
-
createXMLEventReader
Creates an
XMLEventReaderfrom the supplied object representing XML. Supported types are:PathFileNodeXmlStringInputStreamReaderXMLEventReader(returns itself)
- Parameters:
obj- the object to read- Returns:
- XML event reader
-