سؤال

I'm using pugixml library to read and write xml files.

How can I do deep copy "Clone" to the xml_document object in pugixml library?

هل كانت مفيدة؟

المحلول

Here's the easiest option:

xml_document copy;
copy.reset(doc);

If you need to be more fine-grained you can use copy.append_copy() on individual nodes.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top