Questions tagged [xmltextreader]
126 questions
1
vote
1 answer
XMLTextReader is not reading all elements
I am trying to read attributes from an XML stream.
Here is an example of the XML code

gberg927
- 1,636
- 9
- 38
- 51
1
vote
2 answers
How to parse and update xml file using xmltextreader or xmlreader
Hi i have the following code to read the xml file and change the value of particular node ,but i want to do the same using xmltextreader or xmlreader, i am trying to avoid the statement…

mahesh
- 3,067
- 16
- 69
- 127
1
vote
1 answer
How to overwrite nodes in an xml file?
I have the following XML file:
maduranga
TRN_UNIT
TrnUnit
0
tbwBrandOverView
…

maduranga
- 183
- 2
- 11
1
vote
0 answers
How to read and create child nodes using XmlReader
I have a xml file. I trying generate a new xml file from that old xml file with some modification.
I have xml like this
…

Milind Varne
- 31
- 2
1
vote
2 answers
How to identify short tags using XmlTextReader in C#?
Given below is a sample code that reads an XML and writes it. The output XML is invalid because it fails to detect short-tags like " . Is there any way I can detect such tags using XmlTextReader?
while (reader.Read()){
…

DotNet n00b
- 85
- 2
- 12
1
vote
1 answer
XmlTextReader and embedded resource DTD
I'm trying to create a single EXE with no dependencies (spare the .NET Framework :-). The program involves parsing a bunch of XML docs (using XmlTextReader) that share the same DTD. The DTD is referred to by its name alone in the doc, so till now…

roufamatic
- 18,187
- 7
- 57
- 86
1
vote
3 answers
Retrieve the stream file name from a XmlTextReader
This is somewhat trivial but here goes. I am passing an XmlTextReader object to a method using .Net 4.0 framework.
public void TestMethod(XmlTextReader reader)
{
try
{
//...
//Logic
//...
}
catch(Exception…

JustBrowsing
- 155
- 1
- 6
1
vote
0 answers
Is XmlTextReader susceptible to XXE attacks?
We read our XML template files using System.Xml.XmlTextReader. If there is XXE in the XML file we're reading, will that XXE be processed?
If so, major security problem. Can it be turned off?
thanks - dave

David Thielen
- 28,723
- 34
- 119
- 193
1
vote
1 answer
The '', Hexadecimal value 0x1F, is not a valid character. Line 1, Item 1
I am getting xml data through an httpwebrequest. The following code was working fine. But something changed and suddenly started to give me an exception on Read() method with error : The '', Hexadecimal value 0x1F, is not a valid character. Line 1,…

kk_nou
- 103
- 1
- 10
1
vote
2 answers
XmlTextReader ignores second and third Profile element
I have the following XML file:
One
Two
One
…

chuckSaldana
- 1,187
- 12
- 28
1
vote
2 answers
Iterate through xml file and store content inside Textfield c#
I have an Xml file where I want to loop through each module node which increments by 1. Here is a sample of my xml file:
Teacher
maths
…

Steven
- 79
- 2
- 11
1
vote
2 answers
How to loop XmlTextReader properly (C#)?
Below is a sample of the type of XML file I am trying to handle. If I have only one part along with an accompanying number/character I can process the data extraction without the necessity of the 'if (!reader.EOF)' control structure. However when I…

jtth
- 876
- 1
- 12
- 40
1
vote
0 answers
Parse using an XMLTextReader and saving the entire node
I am using vb.net and I am pulling in an url xml file using the following code
Dim PMIDList As String = "25241892,25451079"
Dim sb As New StringBuilder
Dim sw As New StringWriter(sb)
Dim writer As JsonWriter = New…

Bill
- 1,423
- 2
- 27
- 51
1
vote
1 answer
libxml++ TextReader; Skipping nodes
I'm using libxml++ to parse a rather large XML-file and therefore can't use DOM.
Say I have a XML-file like:
#Pages

Scholar
- 463
- 5
- 19
1
vote
2 answers
C# XmlTextReader: html entity replace
I have xml file with TAG like this:
działowa
I'm reading this file using XmlTextReader and for this TAG I get something like this:
działowa
How to replace html entity numbers inside my xml to get something like…

Przemysław Michalski
- 9,627
- 7
- 31
- 37