Copy¶
Copies the current XML node and all its child nodes from the source XPath to the target XPath or target navigator.
1 |
|
Parameters¶
string sourceXPath
XPath of the node to copy. Use "." to specify the current node.
( string | Xml ) target
Target XPath or Xml instance to copy to.
Returns¶
The current Xml instance.
Remarks¶
This method attempts to determine the type of the node being copied from the XML schema. If the relevant schema is found, the copy operation is performed based on the XML schema definitions. Otherwise, it copies only nodes with matching names.
Copying based on XML schema definitions automatically resolves collection items and creates new nodes.
Assume the $Xml
content has the following data:
Sample Data:¶
1 2 3 4 5 6 7 8 9 10 |
|
Copying a Simple Node:¶
1 |
|
Copying a Complex Node:¶
1 |
|