- Documentation
- Shared functions
- xmlNodeSetValue
Function
xmlNodeSetValue
Sets the text inside a node (replaces the previous one).
Syntax
bool xmlNodeSetValue(xmlnode theXMLNode, string value)Arguments
theXMLNodexmlnode- The node.
valuestring- The new text.
Differences from MTA:SA
- These MTA:SA arguments are not here:
boolean setCDATA = false
In MTA:SA
xmlNodeSetValue(xmlnode node, string value, boolean setCDATA = false)Returns
true on success.
Example
local root = xmlCreateFile("motd.xml", "motd")
xmlNodeSetValue(root, "Nowy event w sobote!")
xmlSaveFile(root)
xmlUnloadFile(root)