Package org.apache.axiom.om.util
Class AXIOMUtil
java.lang.Object
org.apache.axiom.om.util.AXIOMUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OMElementstringToOM(String xmlFragment) Create an OMElement from an XML fragment given as a string.static OMElementstringToOM(String xmlFragment, boolean withSecRestrictions) Create an OMElement from an XML fragment given as a string with secure processing option.static OMElementstringToOM(OMFactory omFactory, String xmlFragment) Create an OMElement from an XML fragment given as a string.static OMElementstringToOM(OMFactory omFactory, String xmlFragment, boolean withSecRestrictions) Create an OMElement from an XML fragment given as a string.
-
Constructor Details
-
AXIOMUtil
public AXIOMUtil()
-
-
Method Details
-
stringToOM
Create an OMElement from an XML fragment given as a string.- Parameters:
xmlFragment- the well-formed XML fragment- Returns:
- The OMElement created out of the string XML fragment.
- Throws:
XMLStreamException
-
stringToOM
public static OMElement stringToOM(String xmlFragment, boolean withSecRestrictions) throws XMLStreamException Create an OMElement from an XML fragment given as a string with secure processing option.- Parameters:
xmlFragment- the well-formed XML fragmentwithSecRestrictions- enable/disable security restrictions.- Returns:
- The OMElement created out of the string XML fragment.
- Throws:
XMLStreamException- Error while parsing the XML fragment.
-
stringToOM
public static OMElement stringToOM(OMFactory omFactory, String xmlFragment) throws XMLStreamException Create an OMElement from an XML fragment given as a string.- Parameters:
omFactory- the factory used to build the object modelxmlFragment- the well-formed XML fragment- Returns:
- The OMElement created out of the string XML fragment.
- Throws:
XMLStreamException
-
stringToOM
public static OMElement stringToOM(OMFactory omFactory, String xmlFragment, boolean withSecRestrictions) throws XMLStreamException Create an OMElement from an XML fragment given as a string.- Parameters:
omFactory- the factory used to build the object modelxmlFragment- the well-formed XML fragmentwithSecRestrictions- enable secure processing by disabling DTD and external entity.- Returns:
- The OMElement created out of the string XML fragment.
- Throws:
XMLStreamException- Error while parsing the XML fragment.
-