xmlTreeCopyNodeList

SYNOPSIS

xmlNode xmlTreeCopyNodeList(xmlDoc targetDoc, xmlNode node)

Parameters:

  • targetDoc - the xmlDoc that the new node/nodes will be placed into. This is only to help optimize internal string operations. It's possible to specify no doc by passing in an empty string (''). If node is going in the same document, it's common to use xmlTreeGetDoc(node) as this parameter.

  • node - the first xmlNode of the node list to be copied

Returns:

  • the first xmlNode of the new node list


DESCRIPTION
xmlTreeCopyNodeList() creates a copy of a given node, its children (if they exist), and any of its further siblings.

The newly-created copy is unlinked and needs to be inserted into a tree, using things like xmlTreeAddChild() or xmlTreeAddSibling().

If you know where the copy is going, you can specify the target document with the targetDoc parameter to help optimize internal string operations. Nothing will be broken if a different doc is specified in targetDoc than the one it ends up in once it is inserted.


EXAMPLE

<$newNode = (xmlTreeCopyNodeList(xmlTreeGetDoc($node), $node))>


SEE ALSO
xmlTreeCopyDoc, xmlTreeCopyNode, xmlTreeCopyAttribute, xmlTreeCopyAttributeList


Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.