Sunday 15 February 2015

c# - Reading strange xml doc -


I am trying to read this XML file:

  & lt; Server & gt; & Lt; Version date = "06/05/2013" & gt; 2.5.4 & lt; / Edition & gt; & Lt; Lastfix path = "\" & gt; Now read basic config files! README Read the file! & Lt; / Lastfix & gt; & Lt; Version date = "07/05/2013" & gt; 2.5.3 & lt; / Edition & gt; & Lt; Lastfix Path = "\ wServer \ ClientProcessor.cs" & gt; Fixed character creation bugs (related to mysql, download and import new strait.sql file under DB!) & Lt; / Lastfix & gt; & Lt; Version date = "06/05/2013" & gt; 2.5.0 & lt; / Edition & gt; & Lt; Lastfix Path = "\" & gt; Fix big stability, fix fix, set gold & lt; / Lastfix & gt; & Lt; Version date = "02/05/2013" & gt; 2.4.1 & lt; / Edition & gt; & Lt; LastFix Path = "\ wServer \ realm \ entities \ player \ Player.UseItem.cs" & gt; Nearly finished basement keys! & Lt; / Lastfix & gt; & Lt; Version date = "30/04/2013" & gt; 2.3.1 & lt; / Edition & gt; & Lt; Lastfix Path = "\ wServer \ realm \ entities \ player \ Player.UseItem.cs" & gt; Dungeon keys are working now! & Lt; / Lastfix & gt; & Lt; Version date = "30/04/2013" & gt; 2.3.0 & lt; / Edition & gt; & Lt; Lastfix Path = "\ wServer \ realm \ entities \ player \ Player.Chat.cs" & gt; Added / which, / tell, / server command! & Lt; / Lastfix & gt; & Lt; / Server & gt;   

How to get version and last fax text value!

I was trying this code.

  XmlDocument version = new XmlDocument (); Version.Load (path); Vorach (version xmlnode.select nodes ("server")) {message box. Show (node. Selecting Sense Node ("Last FIX_DATE"). }   

but no success

try it

  XmlDocument version = new XmlDocument (); Version.Load (path); Vorach (version xmlnode node.ChildNode [0]. Student nodes) {if (node ​​name == "version") message box Show ("version:" + node.intext); Else if (node.Name == "Lastfix") MessageBox.Show ("LastFix:" + node.intertext); }    

No comments:

Post a Comment