zoukankan      html  css  js  c++  java
  • c# 测试

    string input = "//a/@href ";
                int index = input.IndexOf("/@");
                String attr = input.Substring(index+2);
                Console.WriteLine("attr=@href");
    ArrayOf 
    <ArrayOfTileResourceInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <TileResourceInfo> <TileMatrixMin>17</TileMatrixMin> <TileMatrixMax>17</TileMatrixMax> <LatMin>36.03515625</LatMin> <LatMax>42.626953125</LatMax> <LonMin>113.433837890625</LonMin> <LonMax>119.8828125</LonMax> <City>***</City> <TileType>***</TileType> <Style>dom</Style> <TileMatrixSet>Matrix_0</TileMatrixSet> <Layer>dom</Layer> <Format>image/tile</Format> <Uri>http://110.249.157.236/domTile/wmts</Uri> </TileResourceInfo> <TileResourceInfo> <TileMatrixMin>17</TileMatrixMin> <TileMatrixMax>17</TileMatrixMax> <LatMin>27.037353515625</LatMin> <LatMax>32.0</LatMax> <LonMin>117.1636962890625</LonMin> <LonMax>123.189697265625</LonMax> <City>*****</City> <TileType>****</TileType> <Style>ZJDOM2W1</Style> <TileMatrixSet>Matrix_0</TileMatrixSet> <Layer>**********</Layer> <Format>image/tile</Format> <Uri>******************</Uri> </TileResourceInfo> </ArrayOfTileResourceInfo>
    Type type = typeof(T);
                T ass = (T)Assembly.GetAssembly(type).CreateInstance(type.FullName);
    
                XmlDocument xdResult = new XmlDocument();
                XmlDeclaration dec = xdResult.CreateXmlDeclaration("1.0", null, null);
                xdResult.AppendChild(dec);
                XmlElement root = xdResult.CreateElement(type.Name);
                xdResult.AppendChild(root);
    
                XmlElement xe = xdResult.CreateElement("Name");
                xe.InnerText = "羊驼";
                root.AppendChild(xe);
    
                XmlSerializer xs = new XmlSerializer(type);
                StringReader reader=new StringReader(xdResult.OuterXml);
                T o = (T)xs.Deserialize(reader);       
  • 相关阅读:
    中文词频统计及词云制作
    字符串操作练习:星座、凯撒密码、99乘法表、词频统计预处理
    python第二节课
    Python第一节课
    了解大数据
    pcb结构定义
    一个完整的大作业
    中文词频统计及词云制作
    字符串操作练习:星座、凯撒密码、99乘法表、词频统计预处理
    Python输入输出练习
  • 原文地址:https://www.cnblogs.com/i80386/p/3169117.html
Copyright © 2011-2022 走看看