writestruct(s, filename)
writestruct(s, filename, name, value)
| Parameter | Description |
|---|---|
| s | a structure or object to serialize. |
| filename | a string: path to the output XML file. |
| name, value | optional pairs: 'FileType', 'StructNodeName', 'AttributeSuffix', or 'PrettyPrint'. |
writestruct creates an XML document from a structure and writes it to a file.
s = struct();
s.name = 'Nelson';
s.value = 12;
filename = [tempdir(), 'writestruct_example.xml'];
writestruct(s, filename, 'StructNodeName', 'root');
fileread(filename)
| Version | Description |
|---|---|
| 2.0.0 | initial version |