Skip to content

xmlread

io · scripts/io/xmlread.m

XMLREAD  Parse an XML document into a Java DOM Document (MATLAB compatible).

  DOMNODE = XMLREAD (FILENAME) parses the XML file FILENAME with the Java
  DOM parser (javax.xml.parsers.DocumentBuilder) and returns the resulting
  org.w3c.dom.Document, which can be navigated with the usual DOM methods
  (getDocumentElement, getChildNodes, getAttribute, ...).

  DOMNODE = XMLREAD (FILENAME, Name=Value) accepts MATLAB R2026a options:
    AllowDoctype  - true (default) or false.  When false, documents that
                    contain a DOCTYPE declaration error.
    XMLEngine     - "jaxp" (default) or "maxp".  Nexus implements the JAXP
                    engine.  "maxp" is rejected until a native MAXP DOM is
                    available (MATLAB R2026a default remains jaxp).

  The input may also be a URL string, a java.io.File, a
  java.io.InputStream or an org.xml.sax.InputSource.  XMLREAD (..., P)
  with a javax.xml.parsers.DocumentBuilder is accepted as an undocumented
  trailing argument (MATLAB legacy).

  The bundled Java runtime is used; no external interpreter is involved.