| java.lang.Object net.sourceforge.sqlunit.utils.XMLUtils
XMLUtils | final public class XMLUtils (Code) | | Provides commonly used functionality for methods which have to deal
with JDOM elements.
author: Sujit Pal (spal@users.sourceforge.net) version: $Revision: 1.6 $ |
Method Summary | |
public static String | getAttributeValue(Element element, String attribute) Wrapper over Element.getAttributeValue(attributeName) which tests
to see if the attributeName is a variable, if so, does another
lookup of the symbol table to return the value of the variable.
Parameters: element - the JDOM Element. Parameters: attribute - the name of the attribute. | public static String | getText(Element element) Wrapper over Element.getText() which tests to see if the body text
returned is a variable, if so, does another lookup of the symbol
table to return the value of the variable.
Parameters: element - the JDOM Element. | public static String | stripCRLF(String unstripped) Replaces all occurences of CRLF, CR and LF with a single space
and returns the trimmed result string.
Parameters: unstripped - the unstripped string. | public static String | toXMLString(Element element) Converts the Element to a formatted XML String.
Parameters: element - the JDOM Element. |
getAttributeValue | public static String getAttributeValue(Element element, String attribute)(Code) | | Wrapper over Element.getAttributeValue(attributeName) which tests
to see if the attributeName is a variable, if so, does another
lookup of the symbol table to return the value of the variable.
Parameters: element - the JDOM Element. Parameters: attribute - the name of the attribute. the value of the attribute, or the value for the variablestored in the SymbolTable if the value is a variable. |
getText | public static String getText(Element element)(Code) | | Wrapper over Element.getText() which tests to see if the body text
returned is a variable, if so, does another lookup of the symbol
table to return the value of the variable.
Parameters: element - the JDOM Element. the value of the body text, or the value for the variablestored in the SymbolTable if the value is a variable. |
stripCRLF | public static String stripCRLF(String unstripped)(Code) | | Replaces all occurences of CRLF, CR and LF with a single space
and returns the trimmed result string.
Parameters: unstripped - the unstripped string. the stripped string. |
toXMLString | public static String toXMLString(Element element)(Code) | | Converts the Element to a formatted XML String.
Parameters: element - the JDOM Element. a formatted XML String representing the Element. |
|
|