1 // =================================
 2 // Copyright (c) 2024 Seppo Laakko
 3 // Distributed under the MIT license
 4 // =================================
 5 
 6 using System;
 7 
 8 namespace System.Xml
 9 {
10     public class DocumentFragment : ParentNode
11     {
12         public DocumentFragment(const System.Lex.Span& span_int fileIndex_) : base(NodeKind.documentFragmentNodespan_fileIndex_"document_fragment")
13         {
14         }
15         public override Node* Clone(bool deep) const
16         {
17             DocumentFragment* clone = new DocumentFragment(Span()FileIndex());
18             if (deep)
19             {
20                 Node* child = FirstChild();
21                 while (child != null)
22                 {
23                     clone->AppendChild(child->Clone(deep));
24                     child = child->Next();
25                 }
26             }
27             return clone;
28         }
29     }
30 
31     public DocumentFragment* MakeDocumentFragment()
32     {
33         return new DocumentFragment(System.Lex.Span()-1);
34     }
35 }