Linked Questions
68 questions linked to/from LINQ to read XML
1 vote
4 answers
3k views
Reading a complex XML file using linq [duplicate]
I am trying to read a complex XML file using LinQ. The XML file has a lot of levels, how can get all value in one ILIST<> . there are more tags in items.enter code here The XML has the following ...
0 votes
2 answers
3k views
how to read nested elements using Linq to xml [duplicate]
I am trying to read the nested elements in the xml below. So far I have been able to read data in chantier/data element, but now the problem lies in how can I read the data inside <questions><...
0 votes
1 answer
132 views
accessing special element in xml using linq [duplicate]
how can I get Password value for specified Username using linq? For example if Username equals AAAA then passsword is ss. <?xml version="1.0" encoding="utf-8"?> <User> <Username&...
0 votes
0 answers
128 views
How to Read XML tag values in C# [duplicate]
I have an XML file like below: <sections> <section name="516604"> <item key="Terminal" value="254726387322" /> <item key="UserName" value="SomeName" /> <item key="Pass" ...
113 votes
5 answers
335k views
Read XML file into XmlDocument
I am very new to C#. I have XML file (text.xml). I want to read that in XmlDocument and store the stream in string variable.
14 votes
5 answers
99k views
How to read XML file into List<>?
I have a List<> which I wrote into an XML file. Now I am trying to read the same file and write it back to List<>. Is there a method to do that?
5 votes
6 answers
29k views
How to read XML file in c#?
I have following XML file, i want to know best way to read this XML file <MyFile> <Companies> <Company>123</Company> <Company>456</Company> <...
8 votes
3 answers
59k views
Using XmlTextReader
I am a beginner programmer starting off with C#, and web services. In the Service.cs file of my web service, I create a ReadXMLFile() method where I am trying to read an existing XML file, take the ...
2 votes
2 answers
21k views
Reading in a simple XML config file in C#
Im having a hard time remembering how to do this, and most of the examples I'm seeing dont really cover my issue. I'm trying to read in the below XML file, so that if a user selects a Tool Type from a ...
3 votes
2 answers
8k views
Consuming WebApi in MVC3
Using WebApi, what is the best way to consume a service in a MVC client? If the response comes back as: <?xml version="1.0" encoding="UTF-8"?> <ArrayOfContact xmlns:xsd="http://www.w3....
2 votes
1 answer
6k views
Reading large XML files with C#
I would like to know how can I read a XML file from my desktop and put it into a string? Here is my XML: <smallusers> <user id="1"> <name>John</name> <...
3 votes
3 answers
2k views
Does .NET have an equivalent of Json.NET type functionality for XML?
I am currently using the Newtonsoft Json.NET library to parse Json encoded data and then later convert nodes to the desired data type. Here is an example data structure which is already working for ...
3 votes
1 answer
8k views
Customize XML Serialize With new Tags And Attributes And Root
This is my Type: public class MyObject { public string destAdd { get; set; } public long Time { get; set; } public int maxNumb { get; set; } public Account AccountCredentials { get; ...
-1 votes
2 answers
2k views
linq to xml: How to get value of a tag in an element in C#
I have following xml data. <?xml version="1.0" encoding="utf-8" ?> <mail> <id>signUpConfirmation</id> <subject>Activation</subject> <body> Hi, You ...
2 votes
2 answers
4k views
DataSet from XML displayed in DataGridView
I have been looking for an answer for this for a while: I have an XML file that is formatted like so: <root> <string id = "STRING_ID"> <node1> Some data </node1> ...