|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.liacs.subdisc.XMLNode
public class XMLNode
Method Summary | |
---|---|
static org.w3c.dom.Node |
addNodeTo(org.w3c.dom.Node theParentNode,
java.lang.String theElementName)
Creates and adds a Node to theParentNode. |
static void |
addNodeTo(org.w3c.dom.Node theParentNode,
java.lang.String theElementName,
java.lang.Object theTextContent)
Creates and adds a Node to theParentNode. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static org.w3c.dom.Node addNodeTo(org.w3c.dom.Node theParentNode, java.lang.String theElementName)
theParentNode
- the Node to which to add the new Node.theElementName
- the name of the new Node.
public static void addNodeTo(org.w3c.dom.Node theParentNode, java.lang.String theElementName, java.lang.Object theTextContent)
Object
passed in as a
parameter its toString()
method is used as input
String
for the setTextContent()
method for the
new Node. This works fine for build in Java types (eg. Float
and Double
), but may cause trouble for self defined
Objects
. In that case override the toString()
method for the Object
, or pass in a String
.
theParentNode
- the Node to which to add the new Node.theElementName
- the name of the new Node.theTextContent
- the text content for the new Node.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |