1 // Copyright 2018 PDFium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "core/fxcrt/xml/cfx_xmldocument.h" 6 7 #include "core/fxcrt/fx_system.h" 8 #include "core/fxcrt/xml/cfx_xmlinstruction.h" 9 CFX_XMLDocument()10CFX_XMLDocument::CFX_XMLDocument() { 11 root_ = CreateNode<CFX_XMLElement>(L"root"); 12 } 13 14 CFX_XMLDocument::~CFX_XMLDocument() = default; 15 AppendNodesFrom(CFX_XMLDocument * other)16void CFX_XMLDocument::AppendNodesFrom(CFX_XMLDocument* other) { 17 nodes_.reserve(nodes_.size() + other->nodes_.size()); 18 nodes_.insert(nodes_.end(), std::make_move_iterator(other->nodes_.begin()), 19 std::make_move_iterator(other->nodes_.end())); 20 other->nodes_.clear(); 21 } 22