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
4
votes
1 answer

XmlReader.ReadToNextSibling not working

I'm trying to read an xml document but the XmlReader.ReadToNextSibling does not work as advertised on this MSDN Documentation Here is a console example: using System; using System.Collections.Generic; using System.Linq; using System.Text; using…
capdragon
  • 14,565
  • 24
  • 107
  • 153
4
votes
1 answer

Ignoring namespace in XmlReader

I'm using an xmlreader to read an xml file. The problem is i have many undefined namespaces in the child elements. Because of it, I'm unable to read the content of the files. Is there any way to read the contents of the files avoiding this issue or…
senthil kumar
  • 119
  • 2
  • 4
4
votes
4 answers

PHP XMLReader problem with htmlentities

I am processing an external xml document using the method described here ( How to use XMLReader in PHP? ), but I'm coming across this error: ...parser error : Entity 'Atilde' not defined in... and similar, such as cent, acirc, not The error…
Dave
  • 63
  • 1
  • 4
4
votes
1 answer

PHP xmlreader: How to cache xsd schema?

I'm using PHP xmlreader to validate and parse xml data. This xml is validated with some xsd schema from local file via XMLReader::setSchema function and remote xsd schema from http:// via xsd:import/include. Eveything work fine, but it fetch xsd…
hdang
  • 608
  • 5
  • 9
4
votes
3 answers

View all text of an element with XmlReader C#

I'm using an XmlReader to iterate through some XML. Some of the XML is actually HTML and I want to get the text content from the node. Example XML:

Here is some data

Example…
ryanlifferth
  • 125
  • 1
  • 1
  • 6
4
votes
4 answers

Reset StreamReader for multiple XmlReader.Read() usages

I'd like to re-use a StreamReader I've associated with an XML file for .Read()-Calls from System.Xml.XmlReader. Basically I've put together a small extension method featuring the following code: public static string GetValueByPath(this StreamReader…
Dennis Röttger
  • 1,975
  • 6
  • 32
  • 51
4
votes
1 answer

Reading the Stack Overflow RSS feed

I'm trying to get a list of unanswered questions from the feed, but I am having trouble reading it. const string RECENT_QUESTIONS = "https://stackoverflow.com/feeds"; XmlTextReader reader; XmlDocument doc; // Load the feed in reader = new…
Ross
  • 46,186
  • 39
  • 120
  • 173
4
votes
1 answer

Confusion about the proper way to read child nodes with XmlReader

Let's suppose i have the following Xml:
myfield myfield myfield myfield
Daniele Sartori
  • 1,674
  • 22
  • 38
4
votes
1 answer

Deserializing XML element to an Object when the element could be one of many possible elements

Within a local framework with messages transmitted in XML via pub/sub,I need to be able to consume a number of messages, however, all messages are received as simple text and must be deserialized into objects created by the Xsd tool. The messages…
Michael J
  • 41
  • 1
  • 2
4
votes
3 answers

XMLStreamReader for Objective C iPhone?

I am using XMLWriter for generating the xml. Now I want to read this xml with some Reader library/framework. Is there any complementary framework/library available for this. I am currently looking to use TouchXML library to read this, but its not…
user573842
4
votes
1 answer

Detect XML self closing tags with PHP XMLReader

I'd like to parse one XML document using XMLReader. I have a case switch with all the Constants. However, if a Tag is self-closing XMLReader only fires ELEMENT, not ELEMENT and than END_ELEMENT like expected. Detection through class property…
Marco
  • 550
  • 2
  • 6
  • 22
4
votes
2 answers

How to read/write complex object with XmlWriter/XmlReader

I've been trying to find an easy way to write XML using the XmlReader/XmlWriter. I don't really like using the interface "IXmlSerializable", but I've got no choice for some of my dataclass. Anyway, what I want to do is quite simple: private MyClass…
Sauleil
  • 2,573
  • 1
  • 24
  • 27
4
votes
3 answers

Server A using xmlreader to read XML from xmlwriter on server B

I have two servers Server A reads http://www.some-url.com/xmlwriter_src.php using $reader = new XMLReader(); $reader->open('http://www.some-url.com/xmlwriter_src.php'); while ($reader->read()) { /* -- do something -- */ } Server B creates an…
user326096
  • 307
  • 1
  • 4
  • 11
4
votes
4 answers

(C#) How to modify attribute's value in the existing XML file without loading or rewriting the whole file?

I'm making some huge XML files (several GB) with the help of XmlWriter and Linq2Xml. This files are of type: .... .. ..
I don't know values…
4
votes
1 answer

How to use StaxEventItemReader in Spring Batch for complex xml

Please help me in writing the ItemReader() 05/28/2016 75 1 A2334549
Afreen
  • 89
  • 1
  • 10