Linq to xml:XAttribute对象

            XElement c = new XElement("Customers",
    new XElement("Customer",
        new XElement("Name", "John Doe"),
        new XElement("PhoneNumbers",
            new XElement("Phone",
                new XAttribute("type", "home"),
                "555-555-5555"),
            new XElement("Phone",
                new XAttribute("type", "work"),
                "666-666-6666")
        )
    )
);
            Console.WriteLine(c);
posted @ 2008-12-26 10:03  昕友软件开发  阅读(278)  评论(0编辑  收藏  举报
欢迎访问我的开源项目:xyIM企业即时通讯