| java.lang.Object com.sun.jbi.management.internal.support.DOMUtil
DOMUtil | public class DOMUtil (Code) | | This object provides utility methods to manipulate DOM tree.
author: Sun Microsystems, Inc. |
Field Summary | |
final public static String | NS_URI_XMLNS The namespaceURI represented by the prefix xmlns . | final public static DOMUtil | UTIL static object to access the methods of this object. |
Constructor Summary | |
public | DOMUtil() Creates a new instance of DOMUtil. |
Method Summary | |
public String | DOM2String(Document aDocument, Writer aWriter) save document to stream.
Parameters: aDocument - Document Parameters: aWriter - is what the aDocument is serialized to. | public static boolean | areElementsEqual(File file1, File file2, String xpathExp) This method is used to check if the value of the an element is same in the
both of the documents provided. | public String | elementToString(Element element) | public String | getAttribute(Element aElement, String aAttribute, String aPrefix) | public String | getAttribute(Element aElement, String aAttribute) | public NodeList | getChildElements(Element aElement, String aElementTagName) get the children of the same type element tag name. | public Element | getElement(Document aParentDocument, String aTagName) gets the element. | public Element | getElement(Element elem, String tagName) gets the element. | public String | getElementName(Element aElement) get Element Tag Name with striped prefix. | public String | getElementValue(Document doc, String elemName) gets the element value. | public NodeList | getElements(Element aParentElement, String aTagName) gets list of elements. | public NodeList | getElements(Document aParentDocument, String aTagName) gets set of elements. | public String | getLocalName(String qname) Gets the local name from the quname.
Parameters: qname - Qualified name of service. | public String | getName(String aName) strips the prefix of the name if present. | public String | getName(String aName, String aPrefix) | public String | getNamespace(Element el, String qname) Gets the namespace from the qname. | public QName | getQualifiedAttributeValue(Element el, String attrName) use this util method to retrieve a QName in a attribute. | public String | getTextData(Element aElement) use this util method to retrieve a Text Data in a element. | public void | setTextData(Element aElement, String aData) use this util method to set a Text Data in a element. |
NS_URI_XMLNS | final public static String NS_URI_XMLNS(Code) | | The namespaceURI represented by the prefix xmlns .
|
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.
Parameters: aDocument - Document Parameters: aWriter - is what the aDocument is serialized to. String representation of Document throws: Exception - If fails to construct a string. |
areElementsEqual | public static boolean areElementsEqual(File file1, File file2, String xpathExp) throws com.sun.jbi.management.system.ManagementException(Code) | | This method is used to check if the value of the an element is same in the
both of the documents provided.
Parameters: file1 - that contains a descriptor Parameters: file2 - that contains the other descriptor Parameters: elementName - the element name boolean if the elements are equal throws: ManagementException - if there are problems in comparing the documents |
elementToString | public String elementToString(Element element) throws Exception(Code) | | Convert an element to String
Parameters: element - - the element to convert to String |
getAttribute | public String getAttribute(Element aElement, String aAttribute, String aPrefix)(Code) | | get attribute
Parameters: aElement - Element object Parameters: aAttribute - String value of attribute Parameters: aPrefix - String value of prefix String value of Attr value |
getAttribute | public String getAttribute(Element aElement, String aAttribute)(Code) | | get attribute
Parameters: aElement - Element object Parameters: aAttribute - String value of attribute String value of Attr value |
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.
Parameters: aParentDocument - Document for parent node Parameters: aTagName - String for tagname Element with tagname |
getElement | public Element getElement(Element elem, String tagName)(Code) | | gets the element.
Parameters: elem - Element for parent node Parameters: tagName - String for tagname Element with 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 for parent node Parameters: elemName - String for element name Element value |
getElements | public NodeList getElements(Element aParentElement, String aTagName)(Code) | | gets list of elements.
Parameters: aParentElement - Element for parent Parameters: aTagName - String for tagname NodeList with tagname |
getElements | public NodeList getElements(Document aParentDocument, String aTagName)(Code) | | gets set of elements.
Parameters: aParentDocument - Document for parent node Parameters: aTagName - String for tagname NodeList with tagname |
getLocalName | public String getLocalName(String qname)(Code) | | Gets the local name from the quname.
Parameters: qname - Qualified name of service. String local name |
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 |
getName | public String getName(String aName, String aPrefix)(Code) | | adds the prefix to the name
Parameters: aName - String value of Name with prefix Parameters: aPrefix - String value of prefix name with prefix prefixed |
getNamespace | public String getNamespace(Element el, String qname)(Code) | | Gets the namespace from the qname.
Parameters: qname - Qname of service namespace namespace of service |
getQualifiedAttributeValue | public QName getQualifiedAttributeValue(Element el, String attrName) throws IllegalArgumentException(Code) | | use this util method to retrieve a QName in a attribute.
Parameters: aElement - Element containing the attribute Parameters: attrName - attribute name |
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 |
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 |
|
|