Questions tagged [xmlreader]

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

xmlreader
Filter by
Sorted by
Tagged with
0 votes
1 answer
547 views

XmlReader.Create() The remote server returned an error: (403) Forbidden / Ok in Browser

Need a bit of guidance. I'm trying to read a public RSS feed from http://data.eso.sa.gov.au/prod/cfs/crimson/cfs_current_incidents.xml I can read it via any browser without problem but doing so ...
Malcom's user avatar
  • 61
-1 votes
1 answer
159 views

Namecheap API: XML reader exception in C# [duplicate]

I am having a problem while deserializing an XML: [XmlRoot("ProductCategory")] public class ProductCategory { public Product[] Products; } public class Product { [XmlArray("Product")] [...
aniogs's user avatar
  • 15
0 votes
1 answer
668 views

PHP XMLReader start reading from a certain node element number

Not sure if this is possible, for example if I have an XML file that have millions of "item" elements, can I skip the 1 - 100 "item" elements and start reading from the "item" element number 101? XML ...
John Five's user avatar
-1 votes
3 answers
3k views

Convert a XML to CSV using C#

How to convert a XML file to a CSV file in C#, showing only these Tags: <original-impot-no>, <price>, <Small-price>, <Big-price>? sample XML code: it represents one line among ...
tollamie's user avatar
  • 117
0 votes
3 answers
74 views

Selecting the value of XML elements

I don't have much experience with XML files but I'm trying to append a tutorial I found online to suite my needs and I'm not getting the results I would expect. https://support.microsoft.com/en-us/...
shockemc's user avatar
1 vote
1 answer
621 views

XMLReader not reading cdata

I have a problem. I wrote this code but I can't read <![CDATA[Epsilon Yayınları]]>. Items with cdata, when I get them it's empty. Is there an alternative solution? XML: <urunler> <...
Bilal Çakır's user avatar
0 votes
2 answers
4k views

Getting nested values with XML reader in C#

I have a problem where I am trying to get the values of my nested elements in my XML file. -<Modules> -<Modules4> -<Module> <Name>dasd</Name> <Code&...
Whome123's user avatar
0 votes
2 answers
243 views

Replace attribute value in XML (attrubute path variable)

I'm working with an XML document that contains a structure that looks similar to this: <SW.Blocks.OB ID="$"> <AttributeList> <ObjectList> <MultilingualText ID="$" ...
Arnold van Ginkel's user avatar
0 votes
1 answer
1k views

How to Read XML node attributes?

Hi all below is my XML file. <print> <part keyName="logo" fontName="" fontSize="" fontColor="" bold="" italic="" underline="" maxWidth="45" textAlign="center" isBarcode="" isImage="...
Sagar's user avatar
  • 401
0 votes
3 answers
537 views

C# WPF XMLReader and XMLWriter System.IO.IOException

I have 2 buttons in a WPF. The first one writes information into an XML The second one restores it into a List Write Function: public static void Write(List<string> numbers) { ...
Julian's user avatar
  • 185
0 votes
0 answers
30 views

extracting node values & attribute values (parent & child nodes) from large nested xml document using php

I am trying to extract extracting node values & attribute values (parent & child nodes) from large nested xml document. The output should be in form of a table. With my code I can extract ...
William's user avatar
  • 350
0 votes
1 answer
121 views

Extract attribute value of parent node using php along with corresponding text values of child nodes

I am dealing with large xml file that is heavily nested, and have decided to use XML reader due to the the large file. What I intend to extract are values of attribute "PartyID" from parent node (N8:...
William's user avatar
  • 350
1 vote
1 answer
791 views

XmlReader sensative about whitespace between elements [duplicate]

The XML reader seems to be sensitive about white-space around empty elements. If I have an empty element with no spaces (<B />) then the reader doesn't see it as an element. public static void ...
BanksySan's user avatar
  • 28k
1 vote
2 answers
65 views

Why XMLReader repeat mysql insert function inside while and can't stop?

I am using XMLReader to import huge xml file by elements to MySQL database. Xml contains 1 547 772 tags (element) named 'RECORD'. XML example <?xml version="1.0" encoding="utf-8"?> <RECORD&...
Ihor Bilyk's user avatar
-2 votes
1 answer
53 views

XML reader not reading properly

I am trying to use a xml reader to read an url which holds an xml. I am getting an error saying that the strings are null public void readEyeData() { XmlTextReader reader =...
user8370201's user avatar
0 votes
1 answer
377 views

Writing into same OpenXmlPart being read

Is there a way write into the same OpenXmlPart that is being read by an OpenXmlPartReader? I'm going to detect things with the reader and potentially write things in place with an OpenXmlWriter. Here ...
Daniel A. White's user avatar
1 vote
1 answer
1k views

How to deserialize an XML file containing an \u0000 using XmlSerializer?

I have a problem about XmlSerializer. In my huge XML file, there are some Null characters (\u0000) and so XmlSerializer (Deserializer) gives me an error. I found out that I need to set Normalization ...
Andrew Lerion's user avatar
1 vote
1 answer
2k views

Using XMLreader and xpath in large xml-file C#

So I have this rather large XML-file i need to parse and I don't want to load the whole file in memory. The XML looks something like this: <root> <node attrib ="true"> <...
LimuxKingen's user avatar
0 votes
1 answer
445 views

Handling Empty Date Time Field When Parsing Xml With XmlReader C#

Hi i'm reading a xml file with XmlReader, i have fields in xml file like: <Row> <Column0>A</Column0> <Column1>B</Column1> <Column2>C&...
Ahmet Sozkesen's user avatar
-1 votes
1 answer
24 views

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 (...
user3404273's user avatar
0 votes
1 answer
1k views

php xmlreader get all child nodes

I have a php script using xmlreader to read an xml file and then pass the data to my database which all works fine. I am struggling with the images though. I can only work out how to get the first ...
Barry Connolly's user avatar
4 votes
1 answer
2k views

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 ...
Marco's user avatar
  • 550
3 votes
1 answer
4k views

Read/Write large XMLs without using too much memory in PHP

I'm trying to query some very large XML files (up to several gig), check them for being well-formed, and write them to hard disk. Seems easy, but as they are so large I can not have a whole document ...
Marco's user avatar
  • 550
1 vote
2 answers
1k views

Finding a value within an xml segment using XmlReader in C#

I am using XML reader to search through an xml configuration file we use. I want to find the values under a certain key and be able to change them or add if they don't exist. XML Sample <...
John's user avatar
  • 827
0 votes
1 answer
929 views

Read each node in IEnumerable<XElement> using XMlReader

I have IEnumerable<XElement> theTestCaseNodes which has the following kind of XElements <testcase> <Main> <test_step type ="action"> <Name>Goto&...
Diana's user avatar
  • 49
2 votes
1 answer
1k views

How to check if another node exists in an xml without reading - C#

I would like to implement code that deserializes an xml into a list of objects. I found a problem in the code where the while reads forward so every other node is skipped. What is the proper way to ...
Courtney Wright's user avatar
0 votes
1 answer
927 views

How to insert multiple rows from xml document to sql server using XmlReader

Of course, I googled my problem : "visual basic xml to sql how to insert many rows XmlReader". I even changed 'many' to 'multiple'. So far, I was able to add only the first entry into my database. I ...
The girl with red hair's user avatar
0 votes
1 answer
198 views

How can I read the contents of sibling elements from XML (with descendants) while accounting for elements with no content using C#?

I am trying to read the contents of an XML file and store it in various lists, however, where I keep running into trouble is trying to read the sibling nodes that are not the innermost child nodes (...
adebs's user avatar
  • 1
1 vote
0 answers
125 views

SimpleXMLReader not working properly

I've been trying to use SimpleXMLReader to retrieve data from the following XML structure: <boutique> <produto num="228122907"> <id_produto><![CDATA[70427038]...
user013314's user avatar
1 vote
5 answers
2k views

How to grab the value of particular element in XML using C# xmlreader class

I have this XML file in which I want to read the values of author and title of book id "bk101" using C# xmlreader class. I am unable to get the value of author and title of that particular id. <?...
gaurav b's user avatar
1 vote
0 answers
499 views

CPU Usage going high while using XMLReader in PHP

I have an huge xml file(23 GB).While parsing using XMLReader, it takes only little memory, but the CPU usage is going 100%. I am using m3 xlarge machine on AWS. What will be the reason? Below is the ...
Lijo Abraham's user avatar
-4 votes
2 answers
2k views

How to get the String of a XML node in C#

enter code herein the XML document : <foo> <bar><para> test </para> </bar> <bar>text</bar> <bar>stackoverflow</bar> </foo> I am ...
Xavier C.'s user avatar
0 votes
0 answers
274 views

XML stream processing

I've been looking through the page but I was not able to find any answer to my problem: I'm downloading a XML file from a server through a stream and processing it using XmlReader: XmlReader xml = ...
Carles's user avatar
  • 443
1 vote
0 answers
65 views

Xml Document Load giving Error Data at the root level is invalid. Line 1, position 1

I am trying to validate the xml using the xsd(xml schema) I have tried all the answers in Stack Overflow but none of them works for me. I get the exception at document.Load line. Do I have to update ...
Arwaa Rasool's user avatar
1 vote
1 answer
2k views

stringbuilder in for loop with if statement

I have a problem with my java program which reads my xml file and show me the content I want.... i have 3 lines in there and it shows me with the System.out.println also these 3 lines with the ...
Hans's user avatar
  • 25
0 votes
0 answers
508 views

How to use XmlReader ReadToFollowing when there are various numbers of same nodes ? (c#)

I don't know if the title was clear but here is my problem. I have an xml file like this : <pdv id="69330005" latitude="4578181.32121" longitude="500540.118325" cp="69330" pop="R"> <adresse&...
Alexandre's user avatar
  • 125
0 votes
1 answer
3k views

C# Deserializing, and validating an XML file against an XSD using XmlReader.Create isn't working

I am using Visual Studio 2015. I apologize for the poorly named "firstName" element. It should have been "fullName", but since I already generated the class for the schema, and this is just for my own ...
Kaman Poole's user avatar
0 votes
1 answer
243 views

How to read xml data on sd card?

I can not figure out the algorithm in reading part. I guess there is only one mistake in the algorithm. I am also looking for a phonebook backup example application . I would be glad if you help me ...
Tepete's user avatar
  • 65
0 votes
1 answer
1k views

How to parse an XML element that has an attribute inside it? Asp.net C#

XML file: <weatherdata> <forecast> <time day="2017-04-18"> <temperature day="-4.26" min="-6.54" max="-4.26" night="-6.54" eve="-4.26" morn="-4.26"/> </time> <...
user avatar
4 votes
4 answers
1k views

(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: <Table recCount="" recLength=""> <Rec recId="1">..</Rec> <Rec recId="...
Paysha Yugen's user avatar
5 votes
1 answer
2k views

How to ignore unknown namespaces with C# XmlReader?

I'm trying to read string XML snippets from input using the XmlReader, manipulate the XDocument and output the result as a string. In case there is a reference to unknown XML namespace, I just want ...
Martin Suchan's user avatar
2 votes
2 answers
4k views

XmlReader.Read() getting name and value

I've been at this for a few hours now and was hoping someone could point me in the right direction. my psuedo xml file: <Parent> <child Seq="1"> <Num1>1137555</Num1&...
user3195943's user avatar
1 vote
2 answers
738 views

XmlReader: Not reading sibling child elements

Following is the code: string str = "<A><B>Apple</B><B>Mango</B></A>"; using (XmlReader xmlReader = XmlReader.Create(new StringReader(str))) { while (...
Benison Sam's user avatar
  • 2,805
1 vote
0 answers
23 views

What will occur at replace xml file on reading?

I have a lrage XML file and i'm read it "on the fly" with XMLReader. All time process take up approx an 1 hour. $xmlReader = new XMLReader(); $xmlReader->open($this->getPath()); while ($...
Adobe's user avatar
  • 568
4 votes
1 answer
7k views

How to use StaxEventItemReader in Spring Batch for complex xml

Please help me in writing the ItemReader() <File> <FileDate>05/28/2016</FileDate> <RecordCount>75</RecordCount> <Transaction> ...
Afreen's user avatar
  • 89
0 votes
1 answer
421 views

How to read an xml in parts using XmlReader?

I have the following extension method to read rows from an excel file. However, the excel file is too large (more than 500K rows and 900 columns) and I was hoping if there is anyway to read the excel ...
Gaurav Kishore's user avatar
5 votes
2 answers
2k views

Prevent XmlReader from expanding XML entities

Is there a way to prevent .NET's XmlReader class from expanding XML entities into their value when reading the content? For instance, suppose the following XML is used as input: <?xml version="1....
Gabriel S.'s user avatar
  • 1,357
0 votes
1 answer
114 views

VB 2010 XML - How to determine the descendant level

By necessity, I have been getting more into the System.XML aspect of VB 2010. In parsing through certain XML files produced by equipment used by our field guys, I'm trying to extract tag names and ...
Bill Norman's user avatar
1 vote
2 answers
534 views

Detect XML fragments in C#

Is there a reliable way to detect in C#/.NET whether a given piece of XML is rooted XML content or a non-rooted fragment? Rooted content: <?xml version="1.0" encoding="UTF-8"?> <root> ...
Gabriel S.'s user avatar
  • 1,357
-1 votes
1 answer
751 views

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

I have an XML element without any children. Its node value is: <property key="TYPES_TO_EXCLUDE_IN_COLLECTOR_PROCESSING"/> And I am trying to create a first child of this element and want to ...
SAGAR MANE's user avatar

1
3 4
5
6 7
23