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

When i read the xml file it reads duplicates of the node

When i try read my xml file it seems to reads it twice and im unsure on how to fix such an error. I thought i can have some sort of loop but im still lost. Any help would be appreciated ty. - It writes the xml file correctly but the duplicate occurs…
Hashey100
  • 994
  • 5
  • 22
  • 47
0
votes
1 answer

COMException was unhandled by user code(Exception from HRESULT: 0xC00CE508) win8 metro apps

I'm writing a little application on WinRT Metro Apps. I need to read an xml file and i get a awful COMException :/ This is which should read this xml: Windows.Storage.StorageFolder storageFolder = await …
0
votes
2 answers

error when looping through xml files in directory with XmlTextReader

I am using the following code to loop through a directory, looking for xml files and readind them in: XmlReader reader = null; foreach (string file in files) { try { System.IO.FileInfo fi = new System.IO.FileInfo(file); string fext…
MariusD
  • 129
  • 1
  • 2
  • 14
0
votes
2 answers

extracting theNamespace from the xml file

I am working on the XML files in C#. I want to extact the name space and do some maniplations. say my xml file looks like this. ABCD
Patan
  • 17,073
  • 36
  • 124
  • 198
-1
votes
6 answers

How to read XML document and display the output as string in c#

consider my source file looks like this. Hello World.This is Fisrt field Hello World.This is second field I…
Patan
  • 17,073
  • 36
  • 124
  • 198
-1
votes
1 answer

what do i have to do to work with xml in vb.net?

i am trying to use xmlreader and all of those, but i do not know how to reference or import them. i am beginner so please be gentle. thanks!
Alex Gordon
  • 57,446
  • 287
  • 670
  • 1,062
-1
votes
1 answer

Editing xml file without creating a new one

I have tried to save the xml file in the following variable and later work on it as normal xml file. This is not working. How can I approach this situation. I need to edit the xml file without editing in the original file and without creating a new…
Ajith MS
  • 1
  • 3
-1
votes
1 answer

Unable to parse XML attribute value into C# Enum in a desired way

I have the following class in C# public class DynamicFieldParameter { [XmlAttribute] public string ParentName { get; set; } [XmlAttribute] public string Label { get; set; } [XmlAttribute] public…
tRuEsAtM
  • 3,517
  • 6
  • 43
  • 83
-1
votes
1 answer

Reading an XML File in .NET Core 3.1 with UTF-8 vs UTF-16

I get the following error (which I see on other SO posts): There is no Unicode byte order mark. Cannot switch to Unicode. I see on other SO posts that users swith: to:
cdub
  • 24,555
  • 57
  • 174
  • 303
-1
votes
1 answer

How to C# Reading xml file

I have an XML file. I want C # with the desktop application. There are similar solutions on the site. But I can't read with the XML I have. How should I proceed about this?
Sefa DEDE
  • 5
  • 1
-1
votes
3 answers

is it possible to alter the node value with xmlreader?

I'm reading in an XML stream that's approximately 100mb, and I'd like to replace values that are over 1mb. example input yes SDFSFDSDFfgdfgsgdf==(this is 5 mb) pdf
Alex Gordon
  • 57,446
  • 287
  • 670
  • 1,062
-1
votes
1 answer

Estimating the iteration element in c# for very large xml files

I am working with a multitude of different xml files where I do not know the iteration element within the file. What I mean with iteration element is the element that is repeated throughout the xml file (also seen in xsd-fiels as…
Dennis C
  • 71
  • 1
  • 13
-1
votes
1 answer

C# Read Sub Elements with XMLReader(?)

I'm currently struggeling with reading Sub-Elements from Sub-Elements. What would be the best way to read a XML structured like that: ... ...
C.User
  • 153
  • 18
-1
votes
1 answer

Namecheap API: XML reader exception in C#

I am having a problem while deserializing an XML: [XmlRoot("ProductCategory")] public class ProductCategory { public Product[] Products; } public class Product { [XmlArray("Product")] [XmlArrayItem("ProductPrice",…
aniogs
  • 15
  • 5