txt = xmlwrite(doc)
xmlwrite(filename, doc)
| Parameter | Description |
|---|---|
| doc | an XML document object returned by xmlread, or XML text. |
| filename | a string: path to the output XML file. |
| Parameter | Description |
|---|---|
| txt | a string containing serialized XML. |
xmlwrite converts an XML document object to text or writes it to a file.
xml_filename = [modulepath('xml'), '/tests/test_xml.xml'];
doc = xmlread(xml_filename);
out_filename = [tempdir(), 'xmlwrite_example.xml'];
xmlwrite(out_filename, doc);
isfile(out_filename)
| Version | Description |
|---|---|
| 2.0.0 | initial version |