Main Content

Structured Data and XML Documents

Work with structured data and Extensible Markup Language documents

Easily read and write structured data to an XML file using the readstruct and writestruct functions.

Develop advanced applications that create, read, write, transform, or query XML documents using the MATLAB® API for XML Processing (MAXP). To use MAXP, you need to be familiar with XML, DOM, XSLT, XPath, and the associated W3C standards.


expand all

readstructCreate structure from file
writestructWrite structure to file
xmlreadRead XML document and return Document Object Model node
xmlwriteWrite XML Document Object Model node
xsltTransform XML document using XSLT engine


expand all

XML Document Reading and Writing that serializes an XML document base class for entity resolvers that creates a text file of element in XML file markup parser parser options XML markup parse error base class for parse error handlers location of parse error class denoting XML markup parse error severity resource identifier resource identifier type DOM writer options

W3C DOM of XML element section in XML document Document of document nodes type of XML document defined by document type of document nodes with names of document nodes in document type definition processing instruction in an XML document type information

XML Transformation stylesheet transformation result as document transformation result as string transformation result as file source document for transformation source file for transformation source string for transformation source document for transformation source file for transformation source string for transformation document transformer

XPath Queries XPath expression type for XPath expression evaluation expression evaluator base class for namespace prefix resolvers


expand all for creating, reading, and writing XML for transforming XML documents for evaluating XPath expressions


Import an XML File into a Document Object Model

Use or xmlread to read an XML file into a DOM document node.

Export a Document Object Model to an XML File

Use or xmlwrite to write a DOM document node to an XML file.