qc_terminate_unconnected_ports qc_xml_write navigation bar

Table of Contents

qc_xml_to_struct

Reads in an XML file as a MATLAB structure.

Syntax

xml_struct = qc_xml_to_struct(filename)  % Reads in XML file 'filename' as struct
    

Description

Reads the given XML file into a MATLAB structure, where each node becomes a field in the structure. The XML hierarchy is represented by nested structures. If a node name is invalid as a MATLAB variable name then it will be coerced into a valid variable name in order to create the structure.

Parameters

filename

A string containing the name of the XML file to read.

Outputs

xml_struct

The contents of the XML file as a MATLAB structure.

Examples

s = qc_xml_to_struct('myfile.xml'); % Reads in the 'myfile.xml' file as a struct 's'
    

See Also

 

navigation bar