Set the value of an XML node

Added by iNTERFACEWARE

Use node.setInner() to set the value of an XML node, only works for XML nodes

Source Code
    -- create sample XML node
   local x = [[
   <patient id ="">
      <first-name>John</first-name>
      <last-name>Smith</last-name>
   </patient>]]
   xmlMsg = xml.parse(x)
   trace(xmlMsg)
   
   -- change the surname (last-name element)
   local node = xmlMsg.patient["last-name"]:setInner('Wilson')
   trace(xmlMsg)
   --> last-name change from "Smith" to Wilson"
   
   -- you probably don't want to do this
   local node = xmlMsg.patient:setInner('Oops I replaced all the patient data...')
   trace(xmlMsg)
   --> patient replaced with "Oops..."
Description
Use node.setInner() to set the value of an XML node, only works for XML nodes