matlab.io.xml.dom.Parser Class
Namespace: matlab.io.xml.dom
Description
Use an object of the matlab.io.xml.dom.Parser class to convert XML markup
to a matlab.io.xml.dom.Document object. A Parser object has two methods
for converting XML If the XML is in a file, use the parseFile method to
convert the XML markup. If the XML is in character vector or string scalar, use the
parseString method.
The XML markup to be parsed must contain only one top-level element, which can be preceded
or followed by a comment or processing instruction. If the markup contains more than one
top-level element, the parser throws an error after processing the first element. The parser
reports comment or processing instruction expected as the reason for the
error.
The matlab.io.xml.dom.Parser class is a handle class.
Creation
Description
parser = matlab.io.xml.dom.Parser() creates an XML
markup parser. Use the Configuration
property to specify parser options.
Properties
Methods
Examples
Limitations
A
Parserobject cannot parse a file if the input XML file contains an<xi>tag.