0
我有一个字符串数组:的LINQ到XML和创建元素
string[] authors = new string[3];
authors[0] = "Charles Dickens";
authors[1] = "Robert Jordan";
authors[2] = "Robert Ludlum";
我使用LINQ to XML来读写XML给定的XML文件,但我无法弄清楚如何使用XElement类创建代表作者数组的XML。
我知道这是沿
XElement xEle = new XElement("Authors",
from a in authors
select new XElement("Authors", ???????
谢谢。该数组实际上嵌套在另一个我正在写入XML的类中,所以问题比看起来要大,但是这让我有了方向。我点了一个这样的头脑时刻。 – Jagd 2009-07-13 16:56:07