| java.lang.Object org.jasig.portal.utils.XML
XML | public class XML (Code) | | This utility provides useful XML helper methods.
author: Ken Weiner, kweiner@unicon.net version: $Revision: 34797 $ |
cloneDocument | public static Document cloneDocument(Document olddoc)(Code) | | This is only being kept around for backward compatibility. Callers
should now be using Document.cloneNode(true).
Parameters: olddoc - the original document a clone of the original document with preserved ID tables |
getChildElementText | public static String getChildElementText(Element e, String childElementName)(Code) | | Gets the text value of a child Element. For example, if an element nameElement
looks like this: FredFlinstone, then
getChildElementText(nameElement, "first") would return "Fred". An empty String
is returned in the case that there is no text under the child Element.
Parameters: e - the Element to search under Parameters: childElementName - the name of the child Element the text value of the child element |
getElementText | public static String getElementText(Element e)(Code) | | Gets the text value of an Element. For example, if an element nameElement
looks like this: Fred, then getElementText(nameElement) would
return "Fred". An empty String is returned in the case that there is no text
under the element.
Parameters: e - the Element with a text value the the text value of the element |
serializeNode | public static String serializeNode(Node node)(Code) | | Gets the contents of an XML Document or Element as a nicely formatted string.
This method is useful for debugging.
Parameters: node - the Node to print; must be of type Document or Element a nicely formatted String suitable for printing |
serializeNode | public static String serializeNode(Node node, OutputFormat format)(Code) | | Gets the contents of an XML Document or Element as a formatted string.
This method is useful for debugging.
Parameters: node - the Node to print; must be of type Document or Element Parameters: format - controls the formatting of the string a nicely formatted String suitable for printing |
|
|