I'd like to create an xml structure like below:
<root>
<element name= "text here 1">
<child>asd</child>
<child>asd</child>
</element>
<element name= "text here 2">
<child>asd</child>
<child>asd</child>
</element>
</root>
I'm familiar with
XElement doc = XElement.Load(mainDirectory);
XElement newElem = new XElement("element", new XElement(child, ""), new XElement(child, ""));
doc.Add(newElem);
doc.Save(mainDirectory);
So I think this falls down on how to add the "attribute" when I am creating "element"