Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 pugixml 库来读取和写入 xml 文件。
如何对 pugixml 库中的 xml_document 对象进行深度复制“克隆”?
这是最简单的选择:
xml_document copy; copy.reset(doc);
如果您需要更细粒度,您可以copy.append_copy()在单个节点上使用。
copy.append_copy()