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
-1
votes
3 answers

Convert a XML to CSV using C#

How to convert a XML file to a CSV file in C#, showing only these Tags: , , , ? sample XML code: it represents one line among several lines, and every line may contains several…
tollamie
  • 117
  • 1
  • 6
  • 20
-1
votes
1 answer

XmlTextReader I couldn't getting my data

I couldn't get the value of a column. I wrote this code: XmlTextReader myReader = new XmlTextReader("./Redirect.xml"); myReader.Read(); while (myReader.Read()) { if…
-1
votes
1 answer

How to create a (first) child element in XML using Java?

I have an XML element without any children. Its node value is: And I am trying to create a first child of this element and want to set a value to it, e.g. like this:
SAGAR MANE
  • 685
  • 2
  • 8
  • 23
-1
votes
1 answer

Xml reader - (403) Forbidden

I use Xml reader to read some blogs feed like this: var reader = XmlReader.Create(url); I'm getting an error with some urls: {"The remote server returned an error: (403) Forbidden."} If I open this url in my browser it works well. Do you have any…
mskuratowski
  • 4,014
  • 15
  • 58
  • 109
-1
votes
1 answer

C# Reader value in Datatable columns

I am new at C# and I would like to ask how is it possible to get a value of the reader (XML file) to a table column. I want the reader value to be a string. I tried to get the value to a listbox1 and it works, but that's not what I need. Thank…
acrylicfrog
  • 11
  • 1
  • 3
-1
votes
1 answer

Objective C - XMLReader miscounting Array

Need help in Objective C count JSON objects. I'm using github.com/amarcadet/XMLReader/ to read my XML. If my JSON returns more than 1 object my code counts the objects perfectly. But if my JSON returns only ONE object it miscounts. Here is my JSON…
Ronaldo Bahia
  • 576
  • 3
  • 24
-1
votes
1 answer

How to read Complex XML Response using C#

I want to read Bank of Canada XML response to get the closing rates of each currency. But they have very complex XML Response, you can check at Visit www.bankofcanada.ca/stats/assets/rates_rss/closing/en_all.xml I'm trying my old way for parsing…
-1
votes
3 answers

Read and Display XML with C#

I cant get any display with the code below. I am simply trying to read the data from the xml file, and display it with the application. Batch Compiler will be my root node from my understanding. Eventually I will be putting the data in a csv file,…
-1
votes
1 answer

PictureBox clearing when dragged out of screen boundries in Visual Studio 2013

It's me again, with a weird problem. I created a code which reads xml file and uses g.Drawstring function to get my sorted xml text to pictureBox1. So I got advanced and made the pictureBox scrollable and noticed the problem. When the text in…
Jack
  • 1
  • 3
-1
votes
1 answer

Why do I get invalid data exception while reading an xml file in C#

I am trying to read an xml file in Unity3D using this code using (XmlReader xmlreader=XmlReader.Create("Assets\\config.xml")) { while (xmlreader.Read()) { Debug.Log (xmlreader.Name.ToString()); } } It prints all the names of…
nix86
  • 2,837
  • 11
  • 36
  • 69
-1
votes
1 answer

Load just XPath search to XMLReader memory?

Can i somehow do this? XMLReader is pull parser, so i expect from him to give me just data i search, but it loads whole document into memory and then gives me search from his memory. This code: $url = $this->buildUrl($name,$params); $xml =…
user1814358
  • 619
  • 3
  • 8
  • 17
-1
votes
1 answer

PHP XML reader not finding node with hyphen

I have the following PHP which works exactly as it should and finds all 'Widgets' in my xml document: if($reader->nodeType == XMLREADER::ELEMENT && $reader->localName == 'manufacturer'){ $reader->read(); if($reader->value ==…
absentx
  • 1,397
  • 4
  • 17
  • 31
-1
votes
1 answer

how does XMLReader work

If I use XMLReader.Create, and pass it a stream, the XMLReader appears to read the entire stream even before I call any read methods, because the position property of the stream changes to match the length of the stream. Is XMLReader then storing…
Jeremy
  • 44,950
  • 68
  • 206
  • 332
-1
votes
3 answers

Parse XML with Child Nodes

I have an XML file which returns a list of products with colors and inventory for each color. What is the best method to loop through this data only returning inventory by color for a specific product i.e. PL-0223? Here is the data.
Jason Miller
  • 253
  • 1
  • 3
  • 10
-1
votes
1 answer

Xml validation - the code is validating an xml file even though it is not valid

I wrote the following code to vaidate an xml file named order.xml private void ValidateOrderXml() { // Create the XmlSchemaSet class. XmlSchemaSet sc = new XmlSchemaSet(); // Add the schema to the collection. …
Avinash
  • 385
  • 3
  • 11
  • 26