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
- Group name (
mystery A / C
) - 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
Post a Comment