You can use
LINQ to XML[
^] to create/modify and delete elements in XML.
With LINQ to XML you can easy create XML like this:
XElement xmlTree1 = new XElement("Root",
new XElement("Child1", 1),
new XElement("Child2", 2),
new XElement("Child3", 3),
new XElement("Child4", 4),
new XElement("Child5", 5),
new XElement("Child6", 6)
);
And output is:
<Root>
<Child3>3</Child3>
<Child4>4</Child4>
<Child5>5</Child5>
</Root>
Hope it can help you.