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
0 answers

Getting error "The element with name 'html' and namespace '' is not an allowed feed format."

"The element with name 'html' and namespace '' is not an allowed feed format."` using (XmlReader reader = new SyndicationFeedXmlReader(client.OpenRead("http://community.psenetwork.org/rss/forums/1-most-recent/"))) { var feed =…
Amar Srivastava
  • 373
  • 3
  • 10
3
votes
2 answers

How to make an XmlReader read the attributes in C#?

I have an XML-Stream that contains the following XML content: B D I can't find a way to get an XmlReader to read to the Key…
LWChris
  • 3,320
  • 1
  • 22
  • 39
3
votes
3 answers

XMLReader (in Php) and Error Handling

Quick version: Whats the standard (innovative? any?) way of catching and handling errors thrown by XMLReader due to malformed file -- specifically un-escaped characters. Prepossessing with Tidy (etc..) isn't a super appealing option, anyone know of…
3
votes
1 answer

Bulk XML file read in PHP

I am new to PHP. My client shared the 5GB XML product information data. I need to import in this data in DB. I have used the below code and run in the browser.
Vishal
  • 61
  • 3
3
votes
1 answer

Why is my new XmlTextReader(stream) reading in many megabytes into memory rather than streaming properly?

I am getting Out of Memory Exceptions when STREAMING in XML into an XmlReader! Looking in a memory profiler we can see that it is calling StringBuilder.Append over and over resulting in tons of 128KB buffers filling all of memory. That's pretty…
Brian Kennedy
  • 3,499
  • 3
  • 21
  • 27
3
votes
0 answers

XmlReader buffer seems to ignore changes to the buffer?

Perhaps my understanding of what is supposed to happen is faulty, so hopefully someone can correct my thought process here. I am trying to process many large XML files that are constantly being sent to us with bad characters embedded in the text…
Jeremy Holovacs
  • 22,480
  • 33
  • 117
  • 254
3
votes
2 answers

Python .xlsx (Office OpenXML) reader as simple as csv module?

I know some Python xlsx readers are emerging, but from what I've seen they don't seem nearly as intuitive as the built-in csv module. What I want is a module that can do something like this: reader = xlsx.reader(open('/path/to/file')) for sheet in…
jmagnusson
  • 5,799
  • 4
  • 43
  • 38
3
votes
1 answer

Getting XPath for node with XmlReader

How to get XPath for the current node with XMLReader? E.g.: 1 So I need to get XPath for 1 which is Employee/Entity/Id. Any ideas? using (var reader = XmlReader.Create(basePath,…
user1618825
3
votes
2 answers

XmlReader read continually

I have a very large xml file. This is the simplified version of xml format. 571099948 TEST01
3
votes
2 answers

How does XmlReader::next position the cursor when it returns false

If I have some XML, for example: book #1 book #2
3
votes
1 answer

.NET: What is the purpose of the ProhibitDtd property in XmlReaderSettings? Why is DTD a security issue?

The documentation says: When set to true, the XmlReader throws an XmlException when any DTD content is encountered. Do not enable DTD processing if you are concerned about Denial of Service issues or if you are dealing with untrusted sources. If…
Cheeso
  • 189,189
  • 101
  • 473
  • 713
3
votes
1 answer

Using PHP's XMLReader, how do I get the line number of the current node?

Using the XMLReader XML parser in PHP 5.3, I need to get the line number of the current node. A column number or total offset from the beginning of the file would be nice, too. Hopefully I don't have to use some hack like parsing every raw node…
scotts
  • 4,027
  • 3
  • 29
  • 26
3
votes
1 answer

Parsing XML file in C#

I have an XML File, generated by library written in c++:
27.06.2014

28.06.2014

Alex Frai
  • 33
  • 8
3
votes
1 answer

check if xmlReader is concrete end element

I've got xmlReader set up and can check for certain elements, but I cant find a way to check for a closing element, lets say I want to have another case statement for tag in addition to its opening one, how could I do this? I know for sure…
Ilja
  • 44,142
  • 92
  • 275
  • 498
3
votes
3 answers

Iteration through XML?

I have a 6GB XML file and I'm using XmlReader to loop through the file. The file's huge but there's nothing I can do about that. I use LINQ, but the size doesn't let me use XDocument as I get an OutOfMemory error. I'm using XmlReader to loop through…
Joe_Hendricks
  • 746
  • 4
  • 16