The root node of the imported tree becomes a child of the node specified as the target path,
as the following example illustrates:
1. Existing Nodes Before Import:
path
- to
- - my
- - - targetNode
- - - - A
- other
- - nodes
2. Sub-tree in xml to import to 'path/to/my/targetNode':
-
3. existing nodes after the import:
path
- to
- - my
- - - targetNode
- - - - A
- - - - B
- - - - - B1
- another
- - sub-tree
public import ( XMLReader $xmlReader, string $targetPath, string $resourceLoadPath = null ) : void | ||
$xmlReader | XMLReader | The XML input to import - must be either XML as a string or a prepared \XMLReader instance containing XML data |
$targetPath | string | path to the node which becomes parent of the root of the imported sub-tree |
$resourceLoadPath | string | |
return | void |