xmlwrite
Serialize an XML document object
📝Syntax
txt = xmlwrite(doc)
xmlwrite(filename, doc)
📥Input Arguments
Parameter Description
doc an XML document object returned by xmlread, or XML text.
filename a string: path to the output XML file.
📤Output Arguments
Parameter Description
txt a string containing serialized XML.
📄Description

xmlwrite converts an XML document object to text or writes it to a file.

💡Examples
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)
🔗See Also
xmlreadwritestruct
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub