importNode
Class: matlab.io.xml.dom.Document
Namespace: matlab.io.xml.dom
Syntax
node = importNode(thisDoc,node,deep)
node = importNode(thisDoc,node)
Description
node = importNode(
imports a node from another document into this document. This method creates a copy of the
node, assigns ownership of the copy to this document, and returns the copy. The imported node
has no parent. Use the thisDoc
,node
,deep
)appendChild
method of this document to insert the
imported node into the document tree.
Imported nodes have the same node name, node type, namespace URI, prefix, and local name as the source node. This table describes additional information that is copied, depending on the node type.
Node Type | Additional Imported Information |
---|---|
matlab.io.xml.dom.Attr | In the copy, the |
matlab.io.xml.dom.DocumentFragment | For a deep copy, the descendants of the source element are recursively
imported and the resulting nodes are reassembled to form the corresponding
subtree. Otherwise, the copy is an empty
|
matlab.io.xml.dom.Document ,
matlab.io.xml.dom.DocumentType | You cannot import these types of nodes. |
matlab.io.xml.dom.Element | Specified attribute nodes of the source element are imported, and the
resulting |
matlab.io.xml.dom.Entity |
You cannot
add imported |
matlab.io.xml.dom.EntityReference | Only the |
matlab.io.xml.dom.Notation |
You cannot add imported The
|
matlab.io.xml.dom.ProcessingInstruction | Target and data values are copied. |
matlab.io.xml.dom.Text ,
matlab.io.xml.dom.CDATASection , and
matlab.io.xml.dom.Comment | Data and length attributes are copied. |
node = importNode(
imports a deep copy of the specified node.thisDoc
,node
)
Input Arguments
Examples
Version History
Introduced in R2021a