| java.lang.Object com.sun.jbi.ui.common.DOMUtil
DOMUtil | public class DOMUtil (Code) | | This object provides utility methods to manipulate DOM tree
author: Sun Microsystems, Inc. |
Constructor Summary | |
public | DOMUtil() |
UTIL | final public static DOMUtil UTIL(Code) | | static object to access the methods of this object
|
DOMUtil | public DOMUtil()(Code) | | Creates a new instance of DOMUtil
|
DOM2String | public String DOM2String(Document aDocument, Writer aWriter) throws Exception(Code) | | save document to stream
xml text Parameters: aDocument - Document Parameters: aWriter - is what the aDocument is serialized to. throws: Exception - on error |
buildDOMDocument | public Document buildDOMDocument(String xmlText) throws Exception(Code) | | return the DOM Document
Parameters: xmlText - String dom document throws: Exception - on parser exception or any other exception |
buildDOMDocument | public Document buildDOMDocument(Reader xmlReader) throws Exception(Code) | | return the DOM Document
Parameters: xmlReader - Reader dom document throws: Exception - on parser exception or any other exception |
getChildElement | public Element getChildElement(Element aElement, String aElementTagName)(Code) | | get the child with the specified tag name
Parameters: aElement - Element for parent node Parameters: aElementTagName - String for tagname NodeList for list of children with the tagname |
getChildElements | public NodeList getChildElements(Element aElement, String aElementTagName)(Code) | | get the children of the same type element tag name
Parameters: aElement - Element for parent node Parameters: aElementTagName - String for tagname NodeList for list of children with the tagname |
getElement | public Element getElement(Document aParentDocument, String aTagName)(Code) | | gets the element
Element with tagname Parameters: aParentDocument - Document for parent node Parameters: aTagName - String for tagname |
getElement | public Element getElement(Element elem, String tagName)(Code) | | get the child element
Parameters: elem - parent element Parameters: tagName - element to look for child element of type tagName |
getElementName | public String getElementName(Element aElement)(Code) | | get Element Tag Name with striped prefix.
Parameters: aElement - Element object String with stripped prefix |
getElementValue | public String getElementValue(Document doc, String elemName)(Code) | | gets the element value
Parameters: doc - document Parameters: elemName - element value of the element |
getElements | public NodeList getElements(Element aParentElement, String aTagName)(Code) | | gets list of elements
NodeList with tagname Parameters: aParentElement - Element for parent Parameters: aTagName - String for tagname |
getElements | public NodeList getElements(Document aParentDocument, String aTagName)(Code) | | gets set of elements
NodeList with tagname Parameters: aParentDocument - Document for parent node Parameters: aTagName - String for tagname |
getName | public String getName(String aName)(Code) | | strips the prefix of the name if present
Parameters: aName - String value of Name with prefix String for name after striping prefix |
getTextData | public String getTextData(Element aElement)(Code) | | use this util method to retrieve a Text Data in a element
Parameters: aElement - Element for text node String contains text |
replaceXmlEntityReferecesToEscapeChars | public static String replaceXmlEntityReferecesToEscapeChars(String xmlString)(Code) | | replaces the xml entity refereces with the xml escape chars
Parameters: xmlString - Text with the xml entity references Parameters: Text - with the xml escape chars |
replaceXmlEscapeCharsToEntityRefereces | public static String replaceXmlEscapeCharsToEntityRefereces(String xmlString)(Code) | | replaces the xml entity refereces with the xml escape chars
Parameters: xmlString - Text with the xml xml escape chars Parameters: Text - with the xml entity refereces |
setTextData | public void setTextData(Element aElement, String aData)(Code) | | use this util method to set a Text Data in a element
Parameters: aElement - Element for text node Parameters: aData - String contains text |
|
|