zoukankan      html  css  js  c++  java
  • 简单的XML操作

    //把String 转成XML
    string resultString = "<querycategory><name>GiftShops</name><score>0.36622</score><name>Wine</name><score>0.14643</score><name>CoffeeampTea</name><score>0.09771</score></querycategory>";
            XmlDocument doc = new XmlDocument();
            doc.LoadXml(resultString);
            XmlElement root = doc.DocumentElement;
            XmlNodeList list = doc.DocumentElement.ChildNodes;
            string j = ((XmlElement)list[0]).InnerText;
            string k = ((XmlElement)list[1]).InnerText;
            Response.Write(j);
            Response.Write(k);

    //将XML转成String
    string path=Server.MapPath(null)+@"\my_phone.xml";
       XmlDocument table=new XmlDocument();
       table.Load(path);
       XmlNode root=table.DocumentElement;
       StringBuilder str=new StringBuilder();
       str.Append(root.OuterXml);

  • 相关阅读:
    有关TensorBoard一些小Tip和实例
    基于Word2Vec的影评挖掘
    CNN实战2:CIFAR-10数据集上的图像识别
    CNN实战1:实现模仿大师绘画
    delphi
    表格录入控件
    税控接口
    TStringGrid
    TStringGrid
    sqlserver
  • 原文地址:https://www.cnblogs.com/liufei88866/p/937334.html
Copyright © 2011-2022 走看看