How can we get the xml data in c#? -


I want to get data from this XML document. How do I get it?

  & lt; Group NAME = "Suspense A / c" RESERVEDNAME = "" & gt; & Lt; PARENT type = "string" & gt; & Amp; 4; Primary & lt; / PARENT & gt; & Lt; LANGUAGENAME.LIST & gt; & Lt; NAME.LIST TYPE = "string" & gt; & Lt; NAME & gt; Suspense A / c & lt; / NAME & gt; & Lt; /NAME.LIST> & Lt; /LANGUAGENAME.LIST> & Lt; / Group & gt;  

I need these values ​​

  1. Group name ( mystery A / C )
  2. Parent ( primary )

Thank you in advance.

I'm a fan of XML. Shiyangan XML Surgery Directoryalization method

then something like this will

  list & lt; Suff & gt; Variable = new list & lt; Content & gt; (); XmlSerializer xml = New XmlSerializer (variable.GetType ()); {Variable = (list & lt; content & gt;) xml.Deserialize (reader) using XmlReader Reader = New XmlReader.Create ("Path")); }  

Now, of course, you have to set all your sections correctly to work. But it's very easy, right?


Comments

Popular posts from this blog

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -