xmlSetText FunctionSets the text contents of an XML element. SyntaxxmlSetText(el, val); Parameters
ReturnsThere is no return value. RemarksUse this function to manipulate your custom data, for instance to keep track of the status of questions as you present them. Using this function instead of the text property of XML element objects protects you from scripting errors if the element does not exist. Example<CUSTOM_FOO> <FOOQUESTION> <STATUS/> </FOOQUESTION> <FOOQUESTION> <STATUS/> </FOOQUESTION> ... </CUSTOM_FOO> xmlSetText(xmlChildOf(xmlChildOf(xmlLocData, "FOOQUESTION", 0), "STATUS", 0), "CORRECT"); xmlSetText(xmlChildOf(xmlChildOf(xmlLocData, "FOOQUESTION", 0), "NOEXIST", 0), "CORRECT"); |