XML:setText(path,text)

Set the value of the text node that is attached to the current element to the string argument. If the single argument form is used, setText will set the value of the text node that is attached to the current node position. When two string arguments are used, the first string is used as a path and the second argument is used as the value of the text node.

Example

doc = xml.parse('<test><typing>the quick brown fox</typing></test>')
doc:setText('/test/typing', 'The quick brown fox jumps over the lazy dog.')