Structured Data and XML Documents
Read and write structured data in XML files. 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.
Functions
Read and Write Structured Data
readstruct | Create structure array from file (Since R2020b) |
writestruct | Write structure array to file (Since R2020b) |
readtable | Create table from file |
writetable | Write table to file |
Classes
MATLAB API for XML Processing
XML Document Reading and Writing
matlab.io.xml.dom.DOMWriter | Writer that serializes an XML document (Since R2021a) |
matlab.io.xml.dom.EntityResolver | Abstract base class for entity resolvers (Since R2021a) |
matlab.io.xml.dom.FileWriter | Writer that creates a text file (Since R2021a) |
matlab.io.xml.dom.Locator | Location of element in XML file (Since R2021a) |
matlab.io.xml.dom.Parser | XML markup parser (Since R2021a) |
matlab.io.xml.dom.ParserConfiguration | XML parser options (Since R2021a) |
matlab.io.xml.dom.ParseError | Specifies XML markup parse error (Since R2021b) |
matlab.io.xml.dom.ParseErrorHandler | Abstract base class for parse error handlers (Since R2021b) |
matlab.io.xml.dom.ParseErrorLocator | Specifies location of parse error (Since R2021b) |
matlab.io.xml.dom.ParseErrorSeverity | Enumeration class denoting XML markup parse error severity (Since R2021b) |
matlab.io.xml.dom.ResourceIdentifier | XML resource identifier (Since R2021a) |
matlab.io.xml.dom.ResourceIdentifierType | XML resource identifier type (Since R2021a) |
matlab.io.xml.dom.WriterConfiguration | XML DOM writer options (Since R2021a) |
W3C DOM
matlab.io.xml.dom.Attr | Attribute of XML element (Since R2021a) |
matlab.io.xml.dom.CDATASection | CDATA section (Since R2021a) |
matlab.io.xml.dom.Comment | Comment in XML document (Since R2021a) |
matlab.io.xml.dom.Document | XML Document (Since R2021a) |
matlab.io.xml.dom.DocumentConfiguration | Specify XML document normalization options (Since R2022a) |
matlab.io.xml.dom.DocumentFragment | Group of document nodes (Since R2021a) |
matlab.io.xml.dom.DocumentType | Document type (Since R2021a) |
matlab.io.xml.dom.Element | Element of XML document (Since R2021a) |
matlab.io.xml.dom.Entity | Entity defined by document type (Since R2021a) |
matlab.io.xml.dom.NamedNodeMap | Set of document nodes with names (Since R2021a) |
matlab.io.xml.dom.NodeList | List of document nodes (Since R2021a) |
matlab.io.xml.dom.Notation | Notation in document type definition (Since R2021a) |
matlab.io.xml.dom.ProcessingInstruction | XML processing instruction (Since R2021a) |
matlab.io.xml.dom.Text | Text in an XML document (Since R2021a) |
matlab.io.xml.dom.TypeInfo | Schema type information (Since R2021a) |
XML Transformation
matlab.io.xml.transform.CompiledStylesheet | Compiled stylesheet (Since R2021a) |
matlab.io.xml.transform.ResultDocument | Store transformation result as document (Since R2021a) |
matlab.io.xml.transform.ResultString | Store transformation result as string (Since R2021a) |
matlab.io.xml.transform.ResultFile | Store transformation result as file (Since R2021a) |
matlab.io.xml.transform.SourceDocument | XML source document for transformation (Since R2021a) |
matlab.io.xml.transform.SourceFile | XML source file for transformation (Since R2021a) |
matlab.io.xml.transform.SourceString | XML source string for transformation (Since R2021a) |
matlab.io.xml.transform.StylesheetSourceDocument | Stylesheet source document for transformation (Since R2021a) |
matlab.io.xml.transform.StylesheetSourceFile | Stylesheet source file for transformation (Since R2021a) |
matlab.io.xml.transform.StylesheetSourceString | XSL source string for transformation (Since R2021a) |
matlab.io.xml.transform.Tracer | Trace execution of stylesheet (Since R2022a) |
matlab.io.xml.transform.Transformer | XML document transformer (Since R2021a) |
XPath Queries
matlab.io.xml.xpath.CompiledExpression | Compiled XPath expression (Since R2021a) |
matlab.io.xml.xpath.EvalResultType | Result type for XPath expression evaluation (Since R2021a) |
matlab.io.xml.xpath.Evaluator | XPath expression evaluator (Since R2021a) |
matlab.io.xml.xpath.PrefixResolver | Abstract base class for namespace prefix resolvers (Since R2021a) |
Namespaces
MATLAB API for XML Processing
matlab.io.xml.dom | Classes for creating, reading, and writing XML (Since R2021a) |
matlab.io.xml.transform | Classes for transforming XML documents (Since R2021a) |
matlab.io.xml.xpath | Classes for evaluating XPath expressions (Since R2021a) |
Topics
- Import an XML File into a Document Object Model
Use
matlab.io.xml.dom.Parser
orxmlread
to read an XML file into a DOM document node. - Export a Document Object Model to an XML File
Use
matlab.io.xml.dom.DOMWriter
orxmlwrite
to write a DOM document node to an XML file.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)