XML Template

<< Click to Display Table of Contents >>

 

XML Template

An XML Template allows processing values in an MQTT message sent in XML format. Users must declare a message's format and replace fields into nodes to be transformed in values by the keywords. An example of a message in XML format is the following:

<updates>
  <update>
    <id>TEMP23A</id>
    <value>34.5</value>
    <quality>true</quality>
    <timestamp>10/18/2016 22:30:45</timestamp>
  </update>
</updates>

 

A possible Template for the previous message would be the following:

<updates>
  <update>
    <id>V1</id>
    <value>V2</value>
    <quality>QL_BOOL</quality>
    <timestamp>TS_TEXT(%m/%d/%y %H:%M:%S)</timestamp>
  </update>
</updates>

Was this page useful?