Questions tagged [xmldocument]

The original .NET type that represents an XML document. The more modern version is XDocument.

XmlDocument is the original .NET type that represents an XML document. The more modern version is XDocument.

Use XmlDocument.LoadXml to load an XmlDocument from a string. Use one of the XmlDocument.Load methods to load from a file path or URL, Stream, TextReader, or XmlReader.

Using XmlDocument.Load with a string containing XML will lead to the common "Data at the root level is invalid" exception.

1239 questions
-1
votes
1 answer

Xdocument.Load gives NotSupported exception

I have been using XDocument in my windows phone app to load xml files.It never gave any problem reading .xml files. but recently I had to add more data to one of my xml files. It was of size 16kb and now it is of 76kb. After this change the load…
bytestorm
  • 1,411
  • 3
  • 20
  • 36
-1
votes
1 answer

VB deserialise DataSet from C# XML

The following Code throws an XML deserialisation error (20,2) and i don't know why. Is there somethign special with XmlSerialiser to know for deserialisation of DataSets? Dim strStringReader As StringReader = New StringReader(strValue) Dim oXS As…
MadMaxAPP
  • 1,035
  • 2
  • 16
  • 39
-1
votes
1 answer

How to obtain full string of XmlElement

I am trying to obtain the complete string of the query element (2nd element) within an xml string like the following: "
Bob Bryan
  • 3,687
  • 1
  • 32
  • 45
-1
votes
1 answer

getting nodes collection using xpath

i have a xmldocument with huge collection of nodes. xmldocument is loaded from string variable. i'm trying to get a nodes collection using xpath. my problem is when i run the app without debug the collection has few nodes( around 5 or 6) but if i…
Rifky
  • 1,444
  • 11
  • 26
-1
votes
2 answers

Which XML reading object will be suitable for recusrive xml investigation?

What is the suggested way to investigate XML recursively? XMLReader / XMLDocument/XMLTextReader /other option ? I'm a little bit confused why we have so much ways to read XML. Important Note: I have a constraint which is the Xml reading object…
JavaSa
  • 5,813
  • 16
  • 71
  • 121
-1
votes
3 answers

How to select the tag based on tag name and get its count

Not able to select the node with the tag name. Smaple XML: Name Name
Ramesh
  • 1,073
  • 6
  • 24
  • 53
-1
votes
2 answers

how to remove a particular tag in xml without the loss of data in c#

I am working on XML documents using c#.

Hi hello bbvahvgxvzhavxhgsavxv

Patan
  • 17,073
  • 36
  • 124
  • 198
-2
votes
4 answers

Getting attributes from XML using c#

I have the following xml contents inside a string variable. i want to get the value of each attribute (JID) in the form of string. Below is my xml
Lazy Programer
  • 171
  • 1
  • 1
  • 12
-2
votes
2 answers

C# : How to modify the structure of my xml?

I am trying to modify the structure of an very extended xml by first adding one more child and afterwards trying to change the parent of the node .I am not very experienced in XML so I was able to add the one child , but it seems that when i'm…
-2
votes
1 answer

I want to create an array containing my xmldocument nodes in c#

Hello I have created an xml file with motivational quotations, and I want to read those quotations into an array. Here is what my xml file looks like: Life is…
GaryDev
  • 15
  • 8
-2
votes
1 answer

Sort XmlDocument by attribute using C#

I have an XmlDocument that looks something like this;
Zastrow
  • 13
  • 1
  • 3
-2
votes
1 answer

Update attribute value of an xml file using c#

I have a xml like the following.. I want to update the VALUE attribute of PARAMETER element inside the last IP element having PARAMCODE="cd3". The number of IP element is dynamically changing. The SelectSingleNode(String) only selects the first…
Nandu
  • 3,076
  • 8
  • 34
  • 51
-2
votes
2 answers

retrieving data from xml file and posting it to listbox

I'm trying to load data from the nodes in my xml file to get them to post in a listbox. Here is what my xml file looks like.
deathismyfriend
  • 2,182
  • 2
  • 18
  • 25
-2
votes
5 answers

Reading XML file into memory and searching it

I have a given XML file that I need to process. For the sake of argument, let's say I've already loaded it in as a string.
user1366062
  • 163
  • 3
  • 16
-2
votes
1 answer

XML node parsing using C# linq

i have xml document like this: Long Beach
user1502952
  • 1,390
  • 4
  • 13
  • 27
1 2 3
82
83