Get the name of a node

Verified
Added by iNTERFACEWARE

Use node.nodeName() to get the name of a node, works for all node types

Source Code
   local Msg, Name = hl7.parse{vmd='example/demo.vmd', data=Data}

   -- get the name of a node
   local name = Msg.PID[5][1][1][1]:nodeName()
   --> "Surname"
Description
Use node.nodeName() to get the name of a node, works for all node types
Usage Details

Use node.nodeName() to get the name of a node.

Note: The node.nodeName() function works with all types of node trees.

How to use the snippet:

  • Paste the code into your script