Einhugur Xml Plugin for Xojo |

# Node.TextValue Property

This property is like a smart macro to do the complicated thing of getting Text value from a child Text node, and it will get the text without drilling down onto the Text node.

TextValue as String {Read and Write}

#### Remarks

For example the following 2 lines are equal:

MessageBox tools.LastChild.FirstChild.TextValue
MessageBox tools.LastChild.TextValue
In this example then LastChild is regular node….and first child of the Last child is text node.
Both the lines will return the same text since the property knows if it is regular node to look for the text on the node bellow it.
This property can also create a text node if it does not exist.
To show how this property can shorten your code then for example the following 3 lines are all equal:
tools.AppendChild("NewTool").AppendChild(EinhugurXml.NodeType.NODE_PCDATA).Text(true).Set("Test")
tools.AppendChild("NewTool").Text(true).Set("Test")
tools.AppendChild("NewTool").TextValue = "Test"

#### See Also

Node Class