|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectxades4j.utils.DOMHelper
public class DOMHelper
Utility methods for DOM nodes.
| Method Summary | |
|---|---|
static Element |
createElement(Document doc,
String name,
String prefix,
String namespaceURI)
Creates an element on the given document. |
static Element |
createElementInTempDocument(String name,
String prefix,
String namespaceURI)
|
static Element |
getFirstChildElement(Node node)
Gets the first child element of a node. |
static Element |
getFirstDescendant(Element e,
String nameSpace,
String localName)
Gets the first element with the specified qualified name that is descendant of e. |
static Element |
getLastChildElement(Node node)
Gets the last child element of a node. |
static Element |
getNextSiblingElement(Node node)
Gets the next sibling of a node that is an element. |
static Document |
getOwnerDocument(Node node)
Gets the owner document of a node. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Document getOwnerDocument(Node node)
node - the node
NullPointerException - if node is null
public static Element createElement(Document doc,
String name,
String prefix,
String namespaceURI)
Document.createElementNS(java.lang.String, java.lang.String). The qualified
name is obtained by prefix:name if the prefix is not null.
doc - the owner documentname - the element's local nameprefix - the element's prefix (may be null)namespaceURI - the element's uri (null for no namespace)
Document.createElementNS(java.lang.String, java.lang.String)
public static Element createElementInTempDocument(String name,
String prefix,
String namespaceURI)
public static Element getFirstChildElement(Node node)
node - the node to get the child from
node or null if none
NullPointerException - if node is nullpublic static Element getLastChildElement(Node node)
node - the node to get the child from
node or null if none
NullPointerException - if node is nullpublic static Element getNextSiblingElement(Node node)
node - the node
null if none
NullPointerException - if node is null
public static Element getFirstDescendant(Element e,
String nameSpace,
String localName)
e.
null if there is no such element
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||