|
TPTP 4.3.0 Testing Tools Project Public API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.hyades.test.common.util.XMLUtil
| Constructor Summary | |
|---|---|
XMLUtil()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
adjustXMLValue(java.lang.String value)
Deprecated. use useXMLSymbols(String) instead. |
static org.w3c.dom.NodeList |
createNodeList(java.util.List nodes)
Returns a NodeList with all nodes of a given list. |
static java.lang.StringBuffer |
createXMLAttribute(java.lang.String attribute,
java.lang.String value,
boolean asChild)
Returns the XML string for the specified attribute and value. |
static org.w3c.dom.NodeList |
getChildrenByName(org.w3c.dom.Element element,
java.lang.String name)
Returns a NodeList with all the children identified by a name
in a given element. |
static int |
getIntValue(org.w3c.dom.Element element,
java.lang.String tagName)
Get the value of the attribute tagName in element as an integer |
static java.lang.String |
getValue(org.w3c.dom.Element element,
java.lang.String name)
Returns a value identified by a name in a given element. |
static org.w3c.dom.Document |
getXmlDom(java.lang.String filePath)
Returns a document based on the content of the specified file. |
static org.w3c.dom.Element |
loadDom(java.io.InputStream inputStream,
java.lang.String name)
Returns an Element with a given name that was loaded from the specified input stream. |
static org.w3c.dom.Element |
loadDom(java.lang.String xml,
java.lang.String name)
Returns an Element with a given name that was loaded from the specified string. |
static java.lang.String |
removeXMLSymbols(java.lang.String xml)
Replaces XML symbols in the xml by they
equivalent character. |
static java.lang.String |
useXMLSymbols(java.lang.String string)
Replaces some of the characters in the string by they
XML symbol. |
static java.lang.String |
xmlVariable(java.lang.String name,
java.lang.String value)
Deprecated. use createXMLAttribute(String, String, boolean) instead. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public XMLUtil()
| Method Detail |
public static java.lang.String useXMLSymbols(java.lang.String string)
string by they
XML symbol.
string -
public static java.lang.String removeXMLSymbols(java.lang.String xml)
xml by they
equivalent character.
xml -
public static java.lang.StringBuffer createXMLAttribute(java.lang.String attribute,
java.lang.String value,
boolean asChild)
useXMLSymbols(String) method.
If the value is null then the return is
an empty StringBuffer.
If asChild is true than this method returns
. If itvalue
false the
return is " attribute="value""
attribute - value - asChild -
public static org.w3c.dom.Element loadDom(java.io.InputStream inputStream,
java.lang.String name)
inputStream - name -
public static org.w3c.dom.Element loadDom(java.lang.String xml,
java.lang.String name)
xml - name -
public static java.lang.String getValue(org.w3c.dom.Element element,
java.lang.String name)
element. This
value can correspond to a regular XML attribute value or to a child node
value. In the last case there should be only one element with the given name.
This method returns null if the value is a zero-length string.
element - name -
public static org.w3c.dom.NodeList getChildrenByName(org.w3c.dom.Element element,
java.lang.String name)
NodeList with all the children identified by a name
in a given element.
element - name -
public static org.w3c.dom.NodeList createNodeList(java.util.List nodes)
NodeList with all nodes of a given list. The
returned node list will thrown a ClassCastException if there
is a element in the list that is not a Node
public static org.w3c.dom.Document getXmlDom(java.lang.String filePath)
filePath -
public static int getIntValue(org.w3c.dom.Element element,
java.lang.String tagName)
element - tagName -
public static java.lang.String xmlVariable(java.lang.String name,
java.lang.String value)
createXMLAttribute(String, String, boolean) instead.
name - value -
public static java.lang.String adjustXMLValue(java.lang.String value)
useXMLSymbols(String) instead.
value -
|
TPTP 4.3.0 Testing Tools Project Public API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||