Questions tagged [xmlreader]

xmlreader - Represents a reader that provides fast, noncached, forward-only access to XML data.

Represents a reader that provides fast, noncached, forward-only access to XML data.

More

1120 questions
3
votes
1 answer

ReadString method of XmlReader removes/ignore CDATA tag

I'm getting a very strange behavior and unable to identify the issue. In following code snippet expected out was />]]> but I'm getting /> why CDATA tag is…
Rizwan
  • 119
  • 1
  • 9
3
votes
3 answers

Passing XML resource to XMLReader

I am trying to pass a .xml file from my res folder to an XMLReader in order to parse it to an object: private void parseXML() { String parsedData = ""; try { Log.w("AndroidParseXMLActivity", "Start"); /** Handling…
EHarpham
  • 602
  • 1
  • 17
  • 34
3
votes
4 answers

How to prevent XMLReader from unescaping characters

I'd like to create a simple XMLreader which reads a complete node (including subnodes) as text: string TXML = @"hallöle"; XmlReader r = XmlReader.Create(new StringReader(TXML)); r.Read(); r.Read(); string o =…
user1410404
  • 51
  • 1
  • 3
3
votes
2 answers

CData in simplexml opened from XMLReader

I've got a bunch of XML file which I'm loading in to my script using XMLReader, creating DOM object and then converting to Simplexml. Problem is one of the XML file uses CDATA which SIMPLEXML ignores and normally using SIMPLEXML_LOAD_FILE I'd…
bertster
  • 383
  • 1
  • 3
  • 17
3
votes
1 answer

Why is my XML reader reading every other element?

I've built a very simple table that displays 4 columns and 4 rows. When the following code is executed it displays every other element in the .xml file. It does not discriminate per table row. It reads through without any problem and I have run…
2
votes
2 answers

How can I access the XML file under SharePoint Mapped Folder for Creating Xml Reader?

I used this code to access the Specific XML under the SharePoint Mapped Folder; XmlReader reader = XmlReader.Create(Assembly.GetExecutingAssembly().GetManifestResourceStream( string.Format("{0}\\{1}",…
mkacar
  • 277
  • 1
  • 7
  • 17
2
votes
2 answers

C# - Effectively using an XmlReader

Ok, so I have this XML file: Iron Repeater true 19 19 50 18
Adam M
  • 113
  • 3
  • 13
2
votes
2 answers

More efficient use of an XMLReader

I have the following code: for (i = 1; i <= loopsNeeded; i++) { lblCurrent.Text = string.Format("{0} of {1}", i, loopsNeeded); prgWriteProgress.Value = i; this.Refresh(); reader = XmlReader.Create(FilePath); …
Mike
  • 618
  • 2
  • 8
  • 27
2
votes
1 answer

Validating SVG file in PHP with XMLReader

I am validating a SVG document (which I believe to be valid) against the SVG spec. I'm using XMLReader in PHP, and would rather stick with that as I will be using XMLReader elsewhere; that said if there are other stream-based readers that will do…
halfer
  • 19,824
  • 17
  • 99
  • 186
2
votes
1 answer

How to get innerXML attribute values using xml reader

I have a similar situation as the example here How to retrieve the "Price" and "Title" values of a book with given ISBN ?
Relativity
  • 6,690
  • 22
  • 78
  • 128
2
votes
1 answer

PHP XMLReader not loading some xml nodes

This is the xml:
Aamir Siddique
  • 334
  • 3
  • 15
2
votes
2 answers

How to use xmlreader to read this xml

My xml section is like this: Or This is a note. What I need is to use XmlReader to read the xml, but I am not sure how to determine if the innerXml is another xmlelement or is just text. I am…
daxu
  • 3,514
  • 5
  • 38
  • 76
2
votes
2 answers

Example of reading well-formed and valid xml reading using xmlReader

I m looking for some good example of reading a well-formed and valid xml file (having external dtd attached to it) using XmlReader of c# Have googled it and gone through books but cannot find a good and well explained example. this is the XML…
RohitWagh
  • 1,999
  • 3
  • 22
  • 43
2
votes
7 answers

C# HttpWebRequest - How to disgtinguish between HTML and XML pages without downloading?

I need to be able to tell if a link (URL) points to an XML file (RSS feed), or a regular HTML file just by looking at the headers, or something similiar (without downloading it) Any good advice for me there ? :) Thanks! Roey
Roey
  • 849
  • 2
  • 11
  • 20
2
votes
2 answers

How to read xml from resource via xmlreader?

I want to read a file.xml in my project (I just want it packed in my .exe) using XmlReader. It works when I read the file from the application folder, but i want to read it from the resources so I can give out my executable without additional…
ShadowMare
  • 2,087
  • 2
  • 25
  • 27