Package de.timroes.axmlrpc.xmlcreator
Class XmlElement
- java.lang.Object
-
- de.timroes.axmlrpc.xmlcreator.XmlElement
-
public class XmlElement extends java.lang.Object
An xml element within an xml tree. In this case an xml element can have a text content OR a multiple amount of children. The xml element itself has a name.- Author:
- Tim Roes
-
-
Constructor Summary
Constructors Constructor Description XmlElement(java.lang.String name)
Create a new xml element with the given name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChildren(XmlElement element)
Add a child to this xml element.void
setContent(java.lang.String content)
Set the content of this xml tag.java.lang.String
toString()
Return a string representation of this xml element.
-
-
-
Method Detail
-
addChildren
public void addChildren(XmlElement element)
Add a child to this xml element.- Parameters:
element
- The child to add.
-
setContent
public void setContent(java.lang.String content)
Set the content of this xml tag. If the content is set the children won't be used in a string representation.- Parameters:
content
- Content of the xml element.
-
toString
public java.lang.String toString()
Return a string representation of this xml element.- Overrides:
toString
in classjava.lang.Object
- Returns:
- String representation of xml element.
-
-