zoukankan      html  css  js  c++  java
  • A simple dynamic library implemented in C# 4.0 to deal with XML structure

    https://github.com/cardinals/XmlToObjectParser

    A simple dynamic library implemented in C# 4.0 to deal with XML structure Assume the following XML sample: _sampleXml = @"<?xml version=""1.0"" encoding=""ISO-8859-1""?> <catalog> <cd country=""USA""> <title>Empire Burlesque</title> <artist>Bob Dylan</artist> <price>10.90</price> </cd> <cd country=""UK""> <title>Hide your heart</title> <artist>Bonnie Tyler</artist> <price>10.0</price> </cd> <cd country=""USA""> <title>Greatest Hits</title> <artist>Dolly Parton</artist> <price>9.90</price> </cd> </catalog>"; With XmlToObjectParser is possible to traversal this XML like this: var numberOfCDsinCatalog = catalog.catalog.cd.Count; //Results in the number Three var titleFromUKCD = catalog.catalog.cd[1].title; // "Hide your heart" For more details take a look at the documentation on the Wiki: https://github.com/tucaz/XmlToObjectParser/wiki/Getting-Started *Special thanks to @MemphisBR for reviewing the code
  • 相关阅读:
    Java经典逻辑编程50题 (转)
    Programmingbydoing
    前端测试框架jest 简介
    puppeteer入门
    面向对象编程
    Java常识
    JS 变量
    jmeter 压力测试
    jmeter 安装
    Java 数据驱动测试
  • 原文地址:https://www.cnblogs.com/Jeely/p/11731846.html
Copyright © 2011-2022 走看看