久久久久久久性爱潮,国产又粗又猛又爽又黄下载视频,尤物国产在线一区视频,欧美日本国产在线不卡

<sup id="4uqqy"><ol id="4uqqy"></ol></sup>
  • <th id="4uqqy"></th>

      • <strike id="4uqqy"><nobr id="4uqqy"><ins id="4uqqy"></ins></nobr></strike><sup id="4uqqy"></sup><strong id="4uqqy"><u id="4uqqy"></u></strong>
        <sub id="4uqqy"></sub>

          綠色資源網(wǎng):您身邊最放心的安全下載站! 最新軟件|熱門(mén)排行|軟件分類(lèi)|軟件專(zhuān)題|廠商大全

          綠色資源網(wǎng)

          技術(shù)教程
          您的位置:首頁(yè)網(wǎng)絡(luò)編程Xml編程 → 讀寫(xiě)xml文件的2個(gè)小函數(shù)

          讀寫(xiě)xml文件的2個(gè)小函數(shù)

          我要評(píng)論 2010/02/07 12:56:10 來(lái)源:綠色資源網(wǎng) 編輯:佚名 [ ] 評(píng)論:0 點(diǎn)擊:348次

          #region 讀寫(xiě)xml文件的2個(gè)小函數(shù),2005 4 2 by hyc

            public void SetXmlFileValue(string xmlPath,string AppKey,string AppValue)//寫(xiě)xmlPath是文件路徑+文件名,AppKey是 Key Name,AppValue是Value
            {
             XmlDocument xDoc = new XmlDocument();
             xDoc.Load(xmlPath);
             XmlNode xNode;
             XmlElement xElem1;
             XmlElement xElem2;

             xNode =  xDoc.SelectSingleNode("//appSettings");

             xElem1 = (XmlElement)xNode.SelectSingleNode("//add[@key='" + AppKey + "']");
             if ( xElem1 != null )
             {
              xElem1.SetAttribute("value",AppValue);
             }
             else
             {
              xElem2 = xDoc.CreateElement("add");
              xElem2.SetAttribute("key",AppKey);
              xElem2.SetAttribute("value",AppValue);
              xNode.AppendChild(xElem2);
             }
             xDoc.Save(xmlPath);
            }


            public void GetXmlFileValue(string xmlPath,string AppKey,ref string AppValue)//讀xmlPath是文件路徑+文件名,AppKey是 Key Name,AppValue是Value
            {
             XmlDocument xDoc = new XmlDocument();
             xDoc.Load(xmlPath);
             XmlNode xNode;
             XmlElement xElem1;

             xNode =  xDoc.SelectSingleNode("//appSettings");

             xElem1 = (XmlElement)xNode.SelectSingleNode("//add[@key='" + AppKey + "']");
             if ( xElem1 != null )
             {
              AppValue=xElem1.GetAttribute ("value");
             }
             else
             {
          //    MessageBox.Show ("There is not any information!");
             }

            }

            #endregion

          關(guān)鍵詞:xml

          閱讀本文后您有什么感想? 已有 人給出評(píng)價(jià)!

          • 1 歡迎喜歡
          • 1 白癡
          • 1 拜托
          • 1 哇
          • 1 加油
          • 1 鄙視