|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.yworks.yfiles.server.graphml.support.XmlSupport
Support classes for handling xml elements.
| Method Summary | |
static java.lang.String |
getAttributeValue(org.w3c.dom.Node node,
java.lang.String attributeName)
Returns the value of an attribute |
static org.w3c.dom.Node |
getChildNode(org.w3c.dom.Node node,
java.lang.String name,
java.lang.String namespace)
Returns a child element of the given node. |
static org.w3c.dom.Node[] |
getChildNodes(org.w3c.dom.Node node,
java.lang.String name,
java.lang.String namespace)
Returns all child elements of the given node with the given name and namespace. |
static org.w3c.dom.Node |
getFirstChildElement(org.w3c.dom.Node node)
Returns the first child node of the given node that is of type Node.ELEMENT_NODE. |
static java.lang.String |
getTextContext(org.w3c.dom.Node node)
Returns the node value of the first child of the given node that is of type Node.TEXT_NODE
or of type Node.CDATA_SECTION_NODE.
|
static java.lang.String |
lookupNamespaceURI(org.w3c.dom.Node xmlNode,
java.lang.String lookupPrefix)
|
static void |
setAttribute(org.w3c.dom.Node node,
java.lang.String attributeName,
java.lang.String value)
Sets the value of an existing attribute. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static void setAttribute(org.w3c.dom.Node node,
java.lang.String attributeName,
java.lang.String value)
node - The node to set the attribute forattributeName - The name of the attributevalue - The new attribute valuepublic static java.lang.String getTextContext(org.w3c.dom.Node node)
Node.TEXT_NODE
or of type Node.CDATA_SECTION_NODE.
Returns an empty string, if no such node exists.
public static java.lang.String getAttributeValue(org.w3c.dom.Node node,
java.lang.String attributeName)
node - The node to return the attribute value forattributeName - The name of the attribute
null, if the attribute does not exist.
public static org.w3c.dom.Node getChildNode(org.w3c.dom.Node node,
java.lang.String name,
java.lang.String namespace)
node - The parent nodename - The name of the child nodenamespace - The child node's namespace.
null, if no child element with the given name and namespace exists.public static org.w3c.dom.Node getFirstChildElement(org.w3c.dom.Node node)
Node.ELEMENT_NODE.
node - The parent node.
null, if the given node has no child elements.
public static org.w3c.dom.Node[] getChildNodes(org.w3c.dom.Node node,
java.lang.String name,
java.lang.String namespace)
node - The parent nodename - The name of the childrennamespace - The children's namespace.
public static java.lang.String lookupNamespaceURI(org.w3c.dom.Node xmlNode,
java.lang.String lookupPrefix)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||