|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.weborganic.xmldoclet.XMLNode
public final class XMLNode
Represents an XML node.
Constructor Summary | |
---|---|
XMLNode(String name)
Constructs the XMLNode. |
|
XMLNode(String name,
Doc doc)
Constructs the XMLNode. |
|
XMLNode(String name,
Doc doc,
int line)
Constructs the XMLNode. |
Method Summary | |
---|---|
XMLNode |
attribute(String name,
boolean value)
Adds an attribute to the node |
XMLNode |
attribute(String name,
String value)
Adds an attribute to the node |
XMLNode |
child(List<XMLNode> nodes)
Adds a list of child nodes. |
XMLNode |
child(XMLNode node)
Adds a child node. |
String |
getAttribute(String name)
Returns the specified attributed. |
String |
getName()
Returns the name of the node. |
void |
save(File dir,
String name,
Charset encoding,
String nsPrefix)
Saves this XML node to the directory specified. |
XMLNode |
text(String text)
Adds text to the content of the node. |
String |
toString(String tabs)
Converts the XML node to a String. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLNode(String name, Doc doc, int line)
name
- The name of the elementdoc
- The source java document the node belongs to.public XMLNode(String name, Doc doc)
name
- The name of the elementdoc
- The source java document the node belongs to.public XMLNode(String name)
name
- The name of the elementMethod Detail |
---|
public XMLNode attribute(String name, String value)
name
- the name of the attribute.value
- the value for the attributepublic XMLNode attribute(String name, boolean value)
name
- the name of the attributevalue
- the value for the attributepublic XMLNode child(List<XMLNode> nodes)
nodes
- The nodes to add.
public XMLNode child(XMLNode node)
node
- The node
public XMLNode text(String text)
text
- The text.
public String getAttribute(String name)
name
- The key for the value to be retrieved.
public String getName()
name
- The name of the node.
public void save(File dir, String name, Charset encoding, String nsPrefix)
dir
- the directory to save this node to.name
- the name of the fileencoding
- the character encoding used for the output.public String toString(String tabs)
tabs
- The tabs used for indentation.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |