XDocument simpleDoc =
new XDocument(
new XElement("TopLevel",
new XElement("SecondLevel",
  new XElement("a", "b",
new XAttribute("class", "level"))
)
)
);
simpleDoc.Dump();
produces:
<TopLevel>
<SecondLevel>
<a class="level">b</a>
</SecondLevel>
</TopLevel>
Enjoy!
No comments:
Post a Comment