Get a child node by name
 Verified
		Added by iNTERFACEWARE
Use node.child() to return the node of the specified name, works for all node types
Source Code
                
                   -- create sample XML node
   local x = [[
   <patient SSN ="">
      <first-name>John</first-name>
      <last-name>Smith</last-name>
      <other-name>William</other-name>
      <other-name>Frederic</other-name>
   </patient>]]
   xmlMsg = xml.parse(x)
   trace(xmlMsg)
   
   -- get a named child node - in this case "first-name" and "last-name"
   local fname = xmlMsg.patient:child('first-name')
   local lname = xmlMsg.patient:child('last-name')
   
   -- get the 1st and 2nd "other-name"
   local oname1 = xmlMsg.patient:child('other-name')
   local oname2 = xmlMsg.patient:child('other-name',2)
                            Description
        Use node.child() to return the node of the specified name, works for all node types
    Usage Details
        Use node.child() to return the node of the specified name from an XML node tree. If there are multiple children with the same name you can specify which one to retrieve (this is demonstrated in the code).
Note: The node.child() function works with all types of node trees.
How to use the snippet:
- Paste the code into your script
More Information
        
    Added by iNTERFACEWARE
            
            Use node.append() to append a node to an XML node tree
    Added by iNTERFACEWARE
            
            Use node.isLeaf() to check if a node is a leaf node (has no children), works for all node types
    Added by iNTERFACEWARE
            
            Use node.isKey() to check if a node is the primary key for a database table, this method only for table node trees
    Added by iNTERFACEWARE
            
            Use node.isNull() to check if a node is null (not present), works for all node types
    Added by iNTERFACEWARE
            
            Code to connect to commonly used databases (connecting to other databases is very similar).
    Added by iNTERFACEWARE
            
            Use  iguana.stopOnError(false) to prevent a channel from stopping when an error occurs
    Added by iNTERFACEWARE
            
            How to convert numbers and node trees to a to string representation, and how to convert a numeric strings to numbers
    Added by iNTERFACEWARE
            
            Convert a string to upper case with string.upper(), or lower case with string.lower()
    Added by iNTERFACEWARE
            
            How to convert an HL7 message to and from an XML representation, using chm.toXml{} and chm.fromXml{}
    Added by iNTERFACEWARE
            
            Convert characters to/from numeric codes, the codes will vary depending on the code page settings
    Added by iNTERFACEWARE
            
            Use node.childCount() to count the number of children for a specified node, works for all node types
    Added by iNTERFACEWARE
            
            How to create and unzip a bzip2 or gzip file, using filter.bzip2.deflate() and filter.bzip2.inflate() or gzip.deflate() and gzip.inflate()
    Added by iNTERFACEWARE
            
            Create a generic ACK by using a script in an LLP Listener component
    Added by iNTERFACEWARE
            
            How to create and unzip a zip file containing multiple files and directories, using filter.zip.deflate() and filter.zip.inflate()
    Added by iNTERFACEWARE
            
            How to create Error, Warning, Informational, and Debug log entries
    Added by iNTERFACEWARE
            
            Use os.fs.rmdir() to delete an empty directory, if the directory is not empty an error is returned
    Added by iNTERFACEWARE
            
            Use os.remove() to delete a file or directory, only an empty directory can be deleted
    Added by iNTERFACEWARE
            
            Use node.remove() to delete an element from a table,
    Added by iNTERFACEWARE
            
            Use table.remove() to delete an element from a table
    