Thunderstone Software Document Search, Retrieval, and Management
Search:
Vortex Manual
 

Copying Objects

The copying functions behave like the moving functions, except they leave the original copy of the node intact.

There are no namespace copying functions, as it's rare to need to actually copy a namespace. It's more common to simply use xmlTreeSetNs() to tell an object to use a namespace. See the Using Namespaces (here) section for more information.


EXAMPLE

<capture>
<rootNode><name>John Doe</name><age>34</age></rootNode>
</capture><$xmlRaw = $ret>
<$doc = (xmlTreeNewDocFromString( $xmlRaw, 'XML_PARSE_NOBLANKS'))>
<$root = (xmlTreeGetRootElement($doc))>
<$age = (xmlTreeGetChildren($root, 'age'))>
<$age2 = (xmlTreeCopyNode($root, $age, 1))>
<$output = (xmlTreePrintDoc($doc, 'INDENT'))>
output is $output


SEE ALSO
xmlTreeCopyDoc, xmlTreeCopyNode, xmlTreeCopyNodeList, xmlTreeCopyAttribute, xmlTreeCopyAttributeList


Copyright © Thunderstone Software     Last updated: Thu Dec 22 15:13:31 EST 2011
 
Home   ::   Products   ::   Solutions   ::   How to Buy   ::   Support   ::   Contact Us   ::   News   ::   About
Copyright © 2012 Thunderstone Software LLC. All rights reserved.