Class TextNode
java.lang.Object
com.nomagic.magicreport.engine.xml.TextNode
- All Implemented Interfaces:
Node,Serializable
The Text node represents the textual content (termed character data in XML) of an Element or Attribute.
- Since:
- Jun 1, 2009
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendChild(Node e) Adds the node newChild to the end of the list of children of this node.voidappendContent(char[] str, int offset, int len) Append a content.Return a child.Return a content.Return the parent of this node.voidinsertBefore(Node newChild, int index) Inserts the node newChild before the child index.removeChild(Node oldChild) Removes the child node indicated by oldChild from the list of children, and returns it.voidSet a parent of this node.toString()Return string represents this object.
-
Constructor Details
-
TextNode
public TextNode()Create a text node. -
TextNode
Create a text node with text content.- Parameters:
text- text content.
-
-
Method Details
-
getContent
Return a content.- Returns:
- the content
-
appendContent
public void appendContent(char[] str, int offset, int len) Append a content.- Parameters:
str- the characters to be appended.offset- the index of the first char to append.len- the number of chars to append.
-
getChildNodes
Return a child.- Specified by:
getChildNodesin interfaceNode- Returns:
- the child
-
toString
Return string represents this object. -
setParentNode
Set a parent of this node.- Specified by:
setParentNodein interfaceNode- Parameters:
e- a node.
-
getParentNode
Return the parent of this node.- Specified by:
getParentNodein interfaceNode- Returns:
- the parent
-
appendChild
Adds the node newChild to the end of the list of children of this node.- Specified by:
appendChildin interfaceNode- Parameters:
e- a child element
-
removeChild
Removes the child node indicated by oldChild from the list of children, and returns it.- Specified by:
removeChildin interfaceNode- Parameters:
oldChild- The node being removed.- Returns:
- the node removed.
-
insertBefore
Inserts the node newChild before the child index.- Specified by:
insertBeforein interfaceNode- Parameters:
newChild- the node to insertindex- the reference child index
-