Converting XML to LabVIEW Data

The XML string you want to convert to LabVIEW data must conform to the LabVIEW XML schema. You cannot convert more than one data type from an XML string.

Complete the following steps to convert an XML string to LabVIEW data.

  1. Select the Unflatten from XML function on the Functions»Advanced»Data Manipulation»XML palette and place it on the block diagram.
  2. Wire the XML string that contains the data you want to convert to the xml string input of the Unflatten from XML function.
  3. Specify the data type of the data in the XML string by wiring a constant or control to the type input of the function.

    For example, if the XML string is an array of double-precision, floating-point numbers, wire that data type to the type input.
  4. Right-click the value output of the function and select Create»Indicator from the shortcut menu to create an indicator of the same data type as the type input. An indicator terminal appears on the block diagram, and an indicator appears on the front panel.
  5. Run the VI. LabVIEW converts the xml string to a LabVIEW data type of type according to the LabVIEW XML schema. The value indicator on the front panel displays the LabVIEW data.

Refer to the examples\file\XMLex.llb for examples of converting from the XML format.