Discovering and Reading NFC Tags
After NFC has been started via the NFC Start action, NFC tag discovery is automatically started. If an NFC tag is discovered, then the NFC message in the tag will be automatically received and the information in the message will be stored in the \$MT_NFC tree. This tree was created in the design when the NFC Start/Stop action was added to the design. The complete structure of the tree is given below. Note that an NDEF message can contain multiple NDEF records, and the NDEF records can be recursive. If the NFC tag information that is received does not contain information to fill all the attributes of the NDEFMessage or NDEFRecord elements, then these attributes will not be created in the \$MT_NFC tree.
The information in the \$MT_NFC tree can be processed further and displayed in the same way as other page source data. For example, the \$MT_NFC/Root/Tag/NdefMessage/NdefRecord/@Text node can be linked to a label in order to display the message text in the label.
|Note:||Additional actions to take when an NFC tag is discovered can be specified via the tab of the OnNfcTagDiscovered event.|
|Note:||Information from an NFC tag will overwrite any information that might already exist in the \$MT_NFC tree. So each subsequently discovered tag will replace the information of the previous tag in the \$MT_NFC tree.|