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

XmlDocument is called obsolete

Visual c# 2010 Express says that XmlDocument is obsolete, will this class be removed in the following versions of c# ?
-2
votes
2 answers

Searching an array of XML Nodes

I have an array of System.Xml.XmlNode with data similar to this: [0] = N1Data [1] = N2Data [2] = N3Data Using LINQ, how could I select the inner data of Node2? This…
Jonathan
  • 13,947
  • 17
  • 94
  • 123
-3
votes
1 answer

How to add new XML element to existing NodeList?

Suppose I have ... .. ... ... ... ... ... ... Is it possible to create new element in this kind of XML so that it takes all 's as child nodes…
vinod
  • 9
  • 1
  • 2
-3
votes
1 answer

Create XML with XmlDocument C#

I need to create an XML with this structure :
Rogério
  • 11
  • 4
-3
votes
1 answer

What is wrong with this file or code?

What is happening \ what is the difference ? I'm trying to return a specific node from an XML File. XML File:
Pablo Costa
  • 125
  • 4
  • 14
-3
votes
1 answer

NSXMLParser for xml! why is it so hard to use? is there an easy way?

For the last few hours I have tired to get my head around using NSXMLParser. I understand parts of how it works. WHY Oh WHY! is this so hard? Is there an easy way to do it, like just name the tag and get the contents? Oh how I miss XmlDocument…
Morry
  • 121
  • 2
  • 13
-3
votes
1 answer

How to read xml childs from a closed tag parent in c#

I know how to read normal xml files with c# using XmlDocument. But this time the xml file is different, this is the structure: 2010 20000 k(x + y)/m 30 Ley 10, art. 40
user3776792
  • 41
  • 1
  • 2
-4
votes
1 answer

create XMLDocument that have not any document root node

I wants to create an xml like. ANP Dr. Anny 2016-11-17 admin
Lets Do Green
  • 127
  • 11
-5
votes
1 answer

Why using '@' character when use XML (System.Xml)

What's the difference between: XmlDocumentFragment docFrag = xmlDoc.CreateDocumentFragment(); docFrag.InnerXml = @myString; and XmlDocumentFragment docFrag = xmlDoc.CreateDocumentFragment(); docFrag.InnerXml = myString;
user2896152
  • 762
  • 1
  • 9
  • 32
1 2 3
82
83