|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tonbeller.wcf.utils.DomUtils
Constructor Summary | |
DomUtils()
|
Method Summary | |
static org.w3c.dom.Element |
appendElement(org.w3c.dom.Element parent,
java.lang.String type)
creates a new element of type and appends it to parent |
static org.w3c.dom.Text |
appendNbsp(org.w3c.dom.Element parent)
|
static org.w3c.dom.Text |
appendText(org.w3c.dom.Element parent,
java.lang.String text)
|
static org.w3c.dom.Element |
findElementWithId(java.lang.String id,
org.w3c.dom.Element root)
fast search for Element with id attribute |
static void |
generateIds(org.w3c.dom.Node root)
|
static void |
generateIds(org.w3c.dom.Node root,
java.lang.String attrName)
adds an attribute with random value to all elements, that do not have an attribute with the specified name. |
static org.w3c.dom.Element |
getChildElemById(org.w3c.dom.Element parent,
java.lang.String id)
returns first child element with fitting id. |
static org.w3c.dom.Element |
getChildElemByTagName(org.w3c.dom.Element parent,
java.lang.String tagName)
returns first child element with fitting tag name. |
static java.util.List |
getChildElements(org.w3c.dom.Node parent)
returns List of all direct child elements |
static java.util.List |
getChildElemsByTagName(org.w3c.dom.Element parent,
java.lang.String tagName)
returns Vector of all Child elements, specified by tag name. |
static java.util.List |
getChildNodesExceptAttributes(org.w3c.dom.Node parent)
returns List of all direct child elements exept Attribute nodes. |
static org.w3c.dom.Document |
getDocument(org.w3c.dom.Node node)
returns the Document. node itself may be a Document node in which case node.getOwnerDocument() will return null |
static java.lang.String |
randomId()
|
static void |
removeAttribute(org.w3c.dom.Element elem,
java.lang.String name)
Oracle 10i does not allow to remove an attribute that does not exist. |
static void |
removeChildElements(org.w3c.dom.Element parent)
removes all children of element type |
static void |
removeChildNodesExceptAttributes(org.w3c.dom.Element parent)
removes all children of element ant text type |
static void |
setRandomSeed(long seed)
|
static org.w3c.dom.Text |
setText(org.w3c.dom.Element parent,
java.lang.String text)
removes all element/text children, then adds a new single text child |
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 getChildElemsByTagName(org.w3c.dom.Element parent, java.lang.String tagName)
public static java.util.List getChildElements(org.w3c.dom.Node parent)
public static java.util.List getChildNodesExceptAttributes(org.w3c.dom.Node parent)
public static void removeChildElements(org.w3c.dom.Element parent)
public static void removeChildNodesExceptAttributes(org.w3c.dom.Element parent)
public static org.w3c.dom.Text setText(org.w3c.dom.Element parent, java.lang.String text)
public static org.w3c.dom.Element getChildElemByTagName(org.w3c.dom.Element parent, java.lang.String tagName)
public static org.w3c.dom.Element getChildElemById(org.w3c.dom.Element parent, java.lang.String id)
public static org.w3c.dom.Document getDocument(org.w3c.dom.Node node)
public static org.w3c.dom.Element appendElement(org.w3c.dom.Element parent, java.lang.String type)
public static org.w3c.dom.Text appendNbsp(org.w3c.dom.Element parent)
public static org.w3c.dom.Text appendText(org.w3c.dom.Element parent, java.lang.String text)
public static java.lang.String randomId()
public static void setRandomSeed(long seed)
public static void generateIds(org.w3c.dom.Node root, java.lang.String attrName)
root
- the root elementattrName
- the name of the attribute, e.g. "id"public static void generateIds(org.w3c.dom.Node root)
public static org.w3c.dom.Element findElementWithId(java.lang.String id, org.w3c.dom.Element root)
root
- the root Element of the search. search will cover root and
its descendantsid
- the id to search for
public static void removeAttribute(org.w3c.dom.Element elem, java.lang.String name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |