public class XMLHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM Copyright
|
static java.lang.String | TEXT_AMPERSAND
Ampersand in XML presentation.
|
static java.lang.String | TEXT_DOUBLE_QUOTE
Double quote in XML presentation
|
static java.lang.String | TEXT_DOUBLE_QUOTE_FOR_BLAZE
Double quote for XML presentation and Blaze presentation.
|
static java.lang.String | TEXT_LEFT_ANGLE_BRACKET
Left angle bracket in XML presentation.
|
static java.lang.String | TEXT_RIGHT_ANGLE_BRACKET
Right angle bracket in XML presentation.
|
static java.lang.String | TEXT_SINGLE_QUOTE
Single quote in XML presentation.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String | beginTag(java.lang.String tagName, java.lang.String[] attributes, java.lang.String[] values)
Constructs the beginning tag of an XML Element
|
static java.lang.String | endTag(java.lang.String tagName)
Return the end tag of one XML element
|
static java.lang.String | formatToXMLCompatibleData(java.lang.String text)
Replaces illegal characters with entity references in XML, which include "&", "<", ">", "'" and """
|
static java.lang.String | getAttributeValue(org.w3c.dom.Node node, java.lang.String name)
Returns the value of an attribute
|
static org.w3c.dom.Node | getChildElementByName(org.w3c.dom.Node node, java.lang.String name)
Returns a child element of current node
|
static java.lang.String | getChildElementValue(org.w3c.dom.Element thisNode, java.lang.String childName)
Helps to find the string value of a Child XML element
|
static java.lang.String | getChildElementValue(org.w3c.dom.Node thisNode, java.lang.String childName)
Returns the value of the child element identified by childName parameter
|
static javax.xml.parsers.DocumentBuilder | getDocumentBuilder()
Obtains a non-validating document builder for serial re-use by the current thread.
|
static java.util.Vector | getElementTextValue(org.w3c.dom.Node node, java.lang.String elementTagName)
This method will return a vector of all possible text values which match the given element tag name in the Node Object.
|
static java.lang.String | getElementValue(org.w3c.dom.Node node)
Returns the value of the current element.
|
static org.w3c.dom.Document | getXMLDocument(java.lang.String xmlString)
Generator the XML Document object based on the XML String input.
|
static XMLizable | initializeXMLizableObject(org.w3c.dom.Node node)
Initializes XMLizable object based on the "impl" attribute
|
static java.lang.String | simpleValueTag(java.lang.String tag, java.lang.String value)
Returns an enclosed tag String.
|
static java.lang.String | startTag(java.lang.String tagName)
Return the start tag of one XML element.
|
static java.lang.String | startTag(java.lang.String tagName, java.lang.String attributeName, java.lang.String attributeValue)
Return the start tag with one attribute.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String TEXT_AMPERSAND
public static final java.lang.String TEXT_DOUBLE_QUOTE
public static final java.lang.String TEXT_DOUBLE_QUOTE_FOR_BLAZE
public static final java.lang.String TEXT_LEFT_ANGLE_BRACKET
public static final java.lang.String TEXT_RIGHT_ANGLE_BRACKET
public static final java.lang.String TEXT_SINGLE_QUOTE
public static java.lang.String startTag(java.lang.String tagName)
public static java.lang.String startTag(java.lang.String tagName, java.lang.String attributeName, java.lang.String attributeValue)
public static java.lang.String endTag(java.lang.String tagName)
public static java.lang.String getChildElementValue(org.w3c.dom.Element thisNode, java.lang.String childName)
public static java.lang.String getChildElementValue(org.w3c.dom.Node thisNode, java.lang.String childName)
public static java.util.Vector getElementTextValue(org.w3c.dom.Node node, java.lang.String elementTagName)
public static java.lang.String beginTag(java.lang.String tagName, java.lang.String[] attributes, java.lang.String[] values)
public static final javax.xml.parsers.DocumentBuilder getDocumentBuilder() throws javax.xml.parsers.ParserConfigurationException
public static org.w3c.dom.Document getXMLDocument(java.lang.String xmlString)
public static java.lang.String getElementValue(org.w3c.dom.Node node)
public static java.lang.String getAttributeValue(org.w3c.dom.Node node, java.lang.String name)
public static org.w3c.dom.Node getChildElementByName(org.w3c.dom.Node node, java.lang.String name)
public static java.lang.String simpleValueTag(java.lang.String tag, java.lang.String value)
public static XMLizable initializeXMLizableObject(org.w3c.dom.Node node) throws DeXMLizationException
public static java.lang.String formatToXMLCompatibleData(java.lang.String text)