|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.wsdl.util.xml.DOMUtils
public class DOMUtils
Constructor Summary | |
---|---|
DOMUtils()
|
Method Summary | |
---|---|
static java.lang.String |
cleanString(java.lang.String orig)
|
static int |
countKids(org.w3c.dom.Element elem,
short nodeType)
Count number of children of a certain type of the given element. |
static org.w3c.dom.Element |
findChildElementWithAttribute(org.w3c.dom.Element elem,
java.lang.String attrName,
java.lang.String attrValue)
Return the first child element of the given element which has the given attribute with the given value. |
static java.lang.String |
getAttribute(org.w3c.dom.Element el,
java.lang.String attrName)
Returns the value of an attribute of an element. |
static java.lang.String |
getAttribute(org.w3c.dom.Element el,
java.lang.String attrName,
java.util.List remainingAttrs)
Returns the value of an attribute of an element. |
static java.lang.String |
getAttributeNS(org.w3c.dom.Element el,
java.lang.String namespaceURI,
java.lang.String localPart)
Returns the value of an attribute of an element. |
static java.util.List |
getAttributes(org.w3c.dom.Element el)
Returns a list of attributes of an element. |
static java.lang.String |
getChildCharacterData(org.w3c.dom.Element parentEl)
Concat all the text and cdata node children of this elem and return the resulting text. |
static org.w3c.dom.Element |
getFirstChildElement(org.w3c.dom.Element elem)
Return the first child element of the given element. |
static java.lang.String |
getNamespaceURIFromPrefix(org.w3c.dom.Node context,
java.lang.String prefix)
Given a prefix and a node, return the namespace URI that the prefix has been associated with. |
static org.w3c.dom.Element |
getNextSiblingElement(org.w3c.dom.Element elem)
Return the next sibling element of the given element. |
static java.lang.String |
getPrefix(java.lang.String namespaceURI,
Definition def)
|
static QName |
getQName(java.lang.String prefixedValue,
org.w3c.dom.Element contextEl,
Definition def)
|
static QName |
getQualifiedAttributeValue(org.w3c.dom.Element el,
java.lang.String attrName,
java.lang.String elDesc,
boolean isRequired,
Definition def)
This method should be used for elements that support extension attributes because it does not track the remaining attributes to test for unexpected attributes. |
static QName |
getQualifiedAttributeValue(org.w3c.dom.Element el,
java.lang.String attrName,
java.lang.String elDesc,
boolean isRequired,
Definition def,
java.util.List remainingAttrs)
This method should be used for elements that do not support extension attributes because it tracks the remaining attributes so that eventually any unexpected attributes can be identified. |
static java.lang.String |
getQualifiedValue(java.lang.String namespaceURI,
java.lang.String localPart,
Definition def)
|
static void |
printAttribute(java.lang.String name,
java.lang.String value,
java.io.PrintWriter pw)
|
static void |
printQualifiedAttribute(QName name,
QName value,
Definition def,
java.io.PrintWriter pw)
|
static void |
printQualifiedAttribute(QName name,
java.lang.String value,
Definition def,
java.io.PrintWriter pw)
Prints attributes with qualified names. |
static void |
printQualifiedAttribute(java.lang.String name,
QName value,
Definition def,
java.io.PrintWriter pw)
|
static void |
registerUniquePrefix(java.lang.String prefix,
java.lang.String namespaceURI,
Definition def)
|
static void |
throwWSDLException(org.w3c.dom.Element location)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DOMUtils()
Method Detail |
---|
public static java.util.List getAttributes(org.w3c.dom.Element el)
el
- Element whose attributes are returned
public static java.lang.String getAttribute(org.w3c.dom.Element el, java.lang.String attrName)
el
- Element whose attrib is looked forattrName
- name of attribute to look for
public static java.lang.String getAttribute(org.w3c.dom.Element el, java.lang.String attrName, java.util.List remainingAttrs)
el
- Element whose attrib is looked forattrName
- name of attribute to look forremainingAttrs
- List of remaining attributes
public static java.lang.String getAttributeNS(org.w3c.dom.Element el, java.lang.String namespaceURI, java.lang.String localPart)
el
- Element whose attrib is looked fornamespaceURI
- namespace URI of attribute to look forlocalPart
- local part of attribute to look for
public static java.lang.String getChildCharacterData(org.w3c.dom.Element parentEl)
parentEl
- the element whose cdata/text node values are to
be combined.
public static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Element elem)
elem
- Element whose child is to be returned
public static org.w3c.dom.Element getNextSiblingElement(org.w3c.dom.Element elem)
elem
- Element whose sibling element is to be returned
public static org.w3c.dom.Element findChildElementWithAttribute(org.w3c.dom.Element elem, java.lang.String attrName, java.lang.String attrValue)
elem
- the element whose children are to be searchedattrName
- the attrib that must be presentattrValue
- the desired value of the attribute
public static int countKids(org.w3c.dom.Element elem, short nodeType)
elem
- the element whose kids are to be counted
public static java.lang.String getNamespaceURIFromPrefix(org.w3c.dom.Node context, java.lang.String prefix)
context
- the starting node (looks up recursively from here)prefix
- the prefix to find an xmlns:prefix=uri for
public static QName getQName(java.lang.String prefixedValue, org.w3c.dom.Element contextEl, Definition def) throws WSDLException
WSDLException
public static void registerUniquePrefix(java.lang.String prefix, java.lang.String namespaceURI, Definition def)
public static QName getQualifiedAttributeValue(org.w3c.dom.Element el, java.lang.String attrName, java.lang.String elDesc, boolean isRequired, Definition def) throws WSDLException
WSDLException
public static QName getQualifiedAttributeValue(org.w3c.dom.Element el, java.lang.String attrName, java.lang.String elDesc, boolean isRequired, Definition def, java.util.List remainingAttrs) throws WSDLException
WSDLException
public static void throwWSDLException(org.w3c.dom.Element location) throws WSDLException
WSDLException
public static void printAttribute(java.lang.String name, java.lang.String value, java.io.PrintWriter pw)
public static void printQualifiedAttribute(QName name, java.lang.String value, Definition def, java.io.PrintWriter pw) throws WSDLException
WSDLException
public static void printQualifiedAttribute(QName name, QName value, Definition def, java.io.PrintWriter pw) throws WSDLException
WSDLException
public static void printQualifiedAttribute(java.lang.String name, QName value, Definition def, java.io.PrintWriter pw) throws WSDLException
WSDLException
public static java.lang.String getQualifiedValue(java.lang.String namespaceURI, java.lang.String localPart, Definition def) throws WSDLException
WSDLException
public static java.lang.String getPrefix(java.lang.String namespaceURI, Definition def) throws WSDLException
WSDLException
public static java.lang.String cleanString(java.lang.String orig)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |