|
DOMDocument::importNodeImport node into current document Beschreibung
public DOMNode DOMDocument::importNode
( DOMNode
$importedNode
[, bool $deep
] )This function returns a copy of the node to import and associates it with the current document. Parameter-Liste
Rückgabewerte
The copied node or Fehler/ExceptionsDOMException is thrown if node cannot be imported. Beispiele
Beispiel #1 DOMDocument::importNode example Copying nodes between documents.
<?phpDas oben gezeigte Beispiel erzeugt folgende Ausgabe:
The 'new document' before copying nodes into it:
<?xml version="1.0"?>
<root>
<someelement>text in some element</someelement>
</root>
The 'new document' after copying the nodes into it:
<?xml version="1.0"?>
<root>
<someelement>text in some element</someelement>
<element>
<child>text in child</child>
</element>
</root>
|