Questions tagged [xmltextreader]

126 questions
0
votes
1 answer

Update xml file with xmltextReader in c#

I have xml file like this test.xml: System.Xml.XmlTextReader textReader = new…
user2932395
  • 427
  • 1
  • 5
  • 21
0
votes
1 answer

XmlTextReader - XML reading old content after file update

So I am using a "Updater.exe" which is reading an XML file on my webserver. The Updater checks if a new version of the program is available who transfers the new file (replacing the old one) and runs it. (The file name is gibberish as i dont want…
MiKE
  • 524
  • 6
  • 12
0
votes
1 answer

Need certain xPath search pattern

I want to read a certain XmlNode from a XmlTextReader. My file looks like this: aqua ... while the "aqua" text is surrounded by…
JJB2
  • 53
  • 1
  • 5
0
votes
1 answer

Getting whitespace while reading XML using XMLTextReader

I am reading an XML using XMLTextReader in C#.net. The structure of XML is like below: some value some value After reding attributes, I shift control to element1.…
Microsoft Developer
  • 5,229
  • 22
  • 93
  • 142
0
votes
2 answers

Determine whether file is being accessed by another process when using XmlTextReader

Is there any way to read the file if being used by another process? XmlTextReader reader = new XmlTextReader(inpXMLfileAsString);
user3646105
  • 2,459
  • 4
  • 14
  • 18
0
votes
1 answer

Data at the root level is invalid. Line 1, position 1 on valid in memory xml

I have a very valid XMl string in memory downloaded from an OGC complaint web feature service. When I use the following code to create am XmlTextReader to parse to my parser, using (var sr = new StringReader(schemaString)) { …
Klaus Nji
  • 18,107
  • 29
  • 105
  • 185
0
votes
1 answer

c# Adding strings in List> with XmlTextReader

Ok, i have a List in which i want to add some data from an Xlm file. My List looks like that : List> BookList; And my Xml file looks like this : BookName BookGenre
oimitro
  • 1,466
  • 4
  • 14
  • 22
0
votes
1 answer

XmlTextReader, skipping node with children with same name

I have xml file from 3rd party. Because xml file is big (40MB), I am parsing file step by step using XmlTextReader using this way: class Parser { // ... public void ImportFile(string fileName) { bool isCountryStateFile =…
Fanda
  • 3,760
  • 5
  • 37
  • 56
0
votes
2 answers

Get two different attributes from an Xml File

I have an Xml File that looks like this: What I want is to be able…
mo alaz
  • 4,529
  • 8
  • 30
  • 36
0
votes
3 answers

Dealing with awkward XML layout in c# using XmlTextReader

so I have an XML document I'm trying to import using XmlTextReader in C#, and my code works well except for one part, that's where the tag line is not on the same line as the actually text/content, for example with product_name:
noneabove
  • 89
  • 2
  • 12
0
votes
6 answers

XMLTextReader in .NET 1.1

I have a process that reads an XML file. It uses the XMLTextReader class to do this as it is supposed to be a fast, forward only XML parser/reader. Works just great with a 1 megabyte test file but comes to a complete halt when working on a 12 meg…
user6690
  • 31
  • 1
  • 2
0
votes
3 answers

Reading from XMLText Reader and adding to List of Classes

I have an XML file hosted on a website that I need to read using XMLText Reader. As I am reading, I need to add the items from the XML document as I am reading them to the list of classes. I'm not sure what parameters I should be passing through and…
0
votes
1 answer

Merging XMLTextReaders in C#

I have a website that needs to pull information from two diffferent XML data sources. Originally I only need to get the data from one source so I was building a URL in the backend that went and retrieved the data from the XML site and then parsed…
smitchelluk
  • 172
  • 1
  • 3
  • 13
0
votes
3 answers

C# xmlTextReader error if element doesn't exist

I'm trying to read an xml file using xmlTextReader and store it in a list, but I 'm struggling to overcome this annoying little error. Let me explain a bit more: I'm storing all the nodes from the file in an XmlNodeList, and using a foreach loop to…
Bagshot
  • 57
  • 1
  • 2
  • 7
0
votes
3 answers

Reading adjacent elements in XML

I've got a large XML file and so I'm using XMLTextReader. I'm having trouble reading the value becaues the formatting is a bit different from other XML files I've worked with. Size30
superwpf
  • 365
  • 1
  • 2
  • 7
1 2 3
8 9