tinyxml2
tinyxml2 copied to clipboard
Migrating from tinyxml to tinyxml2 - Parent node pointer NULL after call to DeepClone
Hi,
I'm moving an older tinyxml wrapper library to tinyxml2. I've started to adopt the deepclone method on the tinyxml2::Node structure to duplicate nodes. In doing so I expected that with the cloned node I could do something like: clonedNode->Parent()->InsertEndChild(clonedNode) - so what I'm trying to achieve is to copy a node (any node potentially) and clone it and embed as a sibling to the source node being replicated. Is parent pointer maintained during DeepClone()? What other approachs can I adopt to achieve the clone node as sibling functionality?