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

Read XML with Arabic data embedded c#

I am trying to load an XML file that contains a mix of ASCII text and Arabic characters. Here is the top snippet:
TenG
  • 3,843
  • 2
  • 25
  • 42
-1
votes
3 answers

Pull specific xml tag in a xml file using XmlDocument

I have an xml file, what I am trying to do is to parse the complete file and search for a specific xml tag (in my case I am searching for queryString) and when the tag is encountered pull out the inner text corresponding to it. I am using…
Jilna
  • 190
  • 1
  • 13
-1
votes
1 answer

XPath with "following/preceding-sibling::" executes differently (fails) in .NET for second node

I have an XPath expression that returns nodes whose indexes are dependent upon/relative to their neighboring nodes. It works great in online tests (I tried it with two sites: http://www.freeformatter.com/xpath-tester.html and…
taiji123
  • 366
  • 5
  • 12
-1
votes
2 answers

JQuery can't find element in XMLDocument only in Firefox

I have a call to a webservice that is returning the next raw response HTTP/1.1 200 OK Cache-Control: private Content-Length: 1516 Content-Type: text/xml; charset=utf-8 Server: Microsoft-IIS/8.5 X-AspNet-Version: 4.0.30319 X-Powered-By:…
RSilva
  • 6,753
  • 11
  • 43
  • 49
-1
votes
3 answers

Parsing XML for nodes, and then child nodes

My XML looks like this: I want to loop through all the location elements, and then loop through all the…
cool breeze
  • 4,461
  • 5
  • 38
  • 67
-1
votes
2 answers

Creating XML document with Two root nodes

I want to create XML with two root nodes, like this 6004 HTH testing 20 2/3/2015 12:00:00 AM
-1
votes
1 answer

Trying to change a XML node with no success

I'm trying to change a the value for the model atribute from the following .xml file.
Avión
  • 7,963
  • 11
  • 64
  • 105
-1
votes
1 answer

Show xml code in page

I am trying to generate an API who returns info in xml format. When using the proper URL the XmlDocument is being generated properly but I have problems to show it and send it back. For example in http://maps.googleapis.com/ if I select a place I…
Iban Arriola
  • 2,526
  • 9
  • 41
  • 88
-1
votes
2 answers

Select parent node by children via XmlDocument

Help please, I have the xml file, -1 true
HelloWorld
  • 57
  • 3
  • 9
-1
votes
1 answer

Why is '[' seen as being part of the XmlElement name?

I'm trying to write a method that will query any SQLite table and return its contents as xml: // Get any table's contents as XML; caveat: table can have at most 25 columns (this can be increased if necessary) string…
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
-1
votes
1 answer

Access and overwrite an xml node (C#)

i have this xml (it's trimmed for example purposes) Level 1 Title 01 false
Mauricio
  • 3
  • 1
-1
votes
2 answers

XmlDocument SelectSingleNode of improperly formed XML

I have a XmlDocument which is not properly formed I want to do a XmlDocument.SelectSingleNode for 'lecturer' tag.…
Null Head
  • 2,877
  • 13
  • 61
  • 83
-1
votes
1 answer

Changing a test XML response into a Bean response Java

I am working on this test class and trying to change the response expected to a bean response as I have changed the requests to bean requests. private void assertXmlResponse(Document xmlResponse, int Elements, String Message, String…
Tim
  • 23
  • 3
-1
votes
1 answer

select all xml child nodes that start with a string

I am using C# . I have an xml node with child nodes as follows : 32 344 343 I would like to select all nodes that start with Store Is there a way I can do it ? I know there is a…
CodeNinja
  • 3,188
  • 19
  • 69
  • 112
-1
votes
3 answers

Unable to access inner Xml elements

Question Background: I have extracted the following inner XML from a larger document:
user1352057
  • 3,162
  • 9
  • 51
  • 117