zoukankan      html  css  js  c++  java
  • Linq to xml:链接轴

    XElement root = XElement.Load("Irregular.xml");
    IEnumerable<XElement> configParameters =
        root.Elements("Customer").Elements("Config").
        Elements("ConfigParameter");
    foreach (XElement cp in configParameters)
        Console.WriteLine(cp);

    <Root>
    <ConfigParameter>RootConfigParameter</ConfigParameter>
    <Customer>
    <Name>Frank</Name>
    <Config>
    <ConfigParameter>FirstConfigParameter</ConfigParameter>
    </Config>
    </Customer>
    <Customer>
    <Name>Bob</Name>
    <!--This customer doesn't have a Config element-->
    </Customer>
    <Customer>
    <Name>Bill</Name>
    <Config>
    <ConfigParameter>SecondConfigParameter</ConfigParameter>
    </Config>
    </Customer>
    </Root>
    
    关于作者: 王昕(QQ:475660) 在广州工作生活30余年。十多年开发经验,在Java、即时通讯、NoSQL、BPM、大数据等领域较有经验。
    目前维护的开源产品:https://gitee.com/475660
  • 相关阅读:
    如何复用网页
    sap
    学习方法
    spring + ehcache 实例
    200个 jquery插件
    vs 示例代码浏览器 搜索
    struts jquery 整合
    eclipse clean 后clease 为空
    mvc相关
    css 框架
  • 原文地址:https://www.cnblogs.com/starcrm/p/1363022.html
Copyright © 2011-2022 走看看