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

Getting parts of an xml file and bundle them up in a new one

I'm trying to create a new xml file with parts from other xml files. For example i got these 2 xml files: file 1:
Yustme
  • 6,125
  • 22
  • 75
  • 104
0
votes
4 answers

Parsing XmlDocument with Variable Parent Tags

Assuming I have an XmlDocument like this:
ADJ ADC
Shawn H.
  • 749
  • 1
  • 9
  • 22
0
votes
1 answer

C# Xpath Error content:encoded

How can I read a xml element, something like:

some data here ]] I want to read the above xml node in C#, but when I use... "content:encoded" .. as the xpath runtime error come: …

Riyal MHH
  • 1
  • 1
0
votes
3 answers

Remove special case indentation in XML files

I want to modify a XML file but the tricky part is that the info I add should have minimal formatting. I have been searching for a while and I can't seem to find an answer. Here's what the XML looks currently (original):
inquisitive_one
  • 1,465
  • 7
  • 32
  • 56
0
votes
3 answers

how to get xml .text using c#

here is my xml file browser http://yahoo.com apple this xml…
Edison
  • 79
  • 1
  • 13
0
votes
3 answers

Load ASMX service as XMLDocument

Can someone help me? I load ASMX as XMLDocument, I use following code: string url = "http://www.*******.com/WebService.asmx/Test"; wsResponse.Load(url); string XMLDocument = wsResponse.InnerXml; Response.ContentType = "text/xml"; …
Tiho
  • 123
  • 2
  • 8
0
votes
1 answer

Can't get to