XElement MyFamily = new XElement("MyFamily",
new XElement("Parents",
new XElement("Father", "Anjappan",
new XAttribute("Id", "AA1234")),
new XElement("Mother", "Thaiyamuthu",
new XAttribute("Id", "AA4567"))),
new XElement("Brothers", "Senthil,Saravanan,Sathish"),
new XElement("Systers", "Povunamma,Pazhaniyamma,Sangeetha"));
MyFamily.Save(@System.AppDomain.CurrentDomain.BaseDirectory + "MyFamily_RemoveElement.xml");
在这里,我想使用 Linq to xml 概念获取父亲值(“Anjappan”)和Id值(“AA12345”)。我该怎么做。