|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--ru.novosoft.dc.core.util.DOMService
The class contains miscellaneous static service methods for DOM construction.
| Method Summary | |
static void |
appendString(org.w3c.dom.Element elem,
java.lang.String string)
Create a text node containing the specified string and append it to the specified DOM element. |
static org.w3c.dom.Element |
createChildElement(org.w3c.dom.Element elem,
java.lang.String tagName)
Create a new DOM element with the specified tagName, append it to the specified element, and return created element. |
static org.w3c.dom.Document |
createDocument(org.w3c.dom.DOMImplementation handler,
java.lang.String tagName,
NamespaceHandler namespaceHandler)
Create a new document with the specified root tagName containing a prefix. |
static org.w3c.dom.Document |
createDocument(org.w3c.dom.DOMImplementation handler,
java.lang.String tagName,
java.lang.String namespaceAttribute,
java.lang.String namespaceURI)
Create a new document with the specified root tagName and namespace atribute in it. |
static org.w3c.dom.Node |
findNodeWithTextContent(org.w3c.dom.Node node)
Test the tree of children of the specified node and return the first node (this node or its direct or indirect child) having a single text node child only. |
static void |
removeNodeIfEmpty(org.w3c.dom.Node node)
Test a node to have no attributes and child nodes and remove it from the DOM tree if both conditions fulfilled. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Method Detail |
public static final org.w3c.dom.Document createDocument(org.w3c.dom.DOMImplementation handler,
java.lang.String tagName,
java.lang.String namespaceAttribute,
java.lang.String namespaceURI)
createDocument method of DOMImplementation.
After that we remove the root namespaced node of the document, then
create an ordinary node without namespace, and set the namespace
attribute manually.
public static final org.w3c.dom.Document createDocument(org.w3c.dom.DOMImplementation handler,
java.lang.String tagName,
NamespaceHandler namespaceHandler)
public static final org.w3c.dom.Element createChildElement(org.w3c.dom.Element elem,
java.lang.String tagName)
public static final void appendString(org.w3c.dom.Element elem,
java.lang.String string)
public static final void removeNodeIfEmpty(org.w3c.dom.Node node)
public static final org.w3c.dom.Node findNodeWithTextContent(org.w3c.dom.Node node)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||