xslt
Transform XML using XSLT
📝Syntax
output_file = xslt(xml_source, xslt_file)
output_file = xslt(xml_source, xslt_file, output_file)
txt = xslt(xml_source, xslt_file, '-tostring')
📥Input Arguments
Parameter Description
xml_source a string containing an XML file path, or an XML document object.
xslt_file a string: path to the XSLT file.
output_file a string: path to the output file.
📤Output Arguments
Parameter Description
output_file the path to the generated output file.
txt the transformed text when '-tostring' is used.
📄Description

xslt applies an XSLT stylesheet to XML input. Use '-tostring' to return the transformation result as text.

💡Examples
xml_filename = [modulepath('xml'), '/tests/test_xml.xml'];
xsl_filename = [modulepath('xml'), '/tests/test_xml_to_text.xslt'];
txt = xslt(xml_filename, xsl_filename, '-tostring')
🔗See Also
xmltransformxmlread
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub