Count child nodes

Added by iNTERFACEWARE

Use node.childCount() to count the number of children for a specified node, works for all node types

Source Code
   -- create sample XML node
   local x = [[
   
      John
      Smith
   ]]
   xmlMsg = xml.parse(x)
   trace(xmlMsg)
   
   -- count child nodes - for patient
   local cnt = xmlMsg.patient:childCount()
   --> 3
Description
Use node.childCount() to count the number of children for a specified node, works for all node types