Why do I get web exception when creating an XPathDocument?
Creating an XPathDocument with referenced DTD sometimes throws a web exception. Why? ...
Creating an XPathDocument with referenced DTD sometimes throws a web exception. Why? ...
Ok another WPF question, well I guess this is just general .NET. I have an xml document retreived from a URL. I want to get multiple values out of the document (weather data, location, some other strings). When I use the XmlTextReader I can call my method to pull the values out. The first time I pass the method to search for the xml no...
I'm using a webservice which returns an XmlElement object to my c# program. I would like to read information from the XmlElement using Xpath. What is the best way to create an XPathDocument from the XmlElement? ...
I have a web application where I am trying to cache an XPathDocument. The XPathDocument is created as follows. XPathDocument xdoc = new XPathDocument(new StringReader(ruleXml)); Then I want to just cache this xdoc and retrieve it for each request. And then I plan to call XPathNavigator nav = xdoc.CreateNavigator(); on...
Is there a way to build a XPath query that finds a node at a certain position AND with a certain attribute value? Consider the following sample xml: <Item Type="Book"> <!--1st Param node in a Book item is always the autors last name--> <Param Value="Updike" /> <!--2nd Param node in a Book item is always the autors first name--> <Param ...
I am trying to use a XslCompiledTransform, and use the output as a XPathDocument. Any Ideas? ...
I'm going on a couple assumptions here: XPathDocument is not editable. XmlDocument is editable. XPathDocument is more efficient for XslCompiledTransform. That being the case (and please correct me if I am wrong), would it be better (more efficient) to: Make modifications using the XmlDocument, then convert to an XPathDocument befo...
Here's a question about repeated nodes and missing values. Given the xml below is there a way in XPath of returning (value2, null, value5) rather than (value2, value5)? I'm using an expression that looks like: /nodes/node[*]/value2/text() To retrieve the values. I need to know there's a value missing and at which indexes this occurs....
I am trying to parse a remote XML document (from Amazon AWS): <ItemLookupResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2009-03-31"> <OperationRequest> <RequestId>011d32c5-4fab-4c7d-8785-ac48b9bda6da</RequestId> <Arguments> <Argument Name="Condition" Value="New"></Argument> ...
Given the following... HtmlNode myDiv = doc.DocumentNode.SelectSingleNode("//div[@id='someid']"); ...where the resulting myDiv.InnerHtml contains: <span>...other content I want to consume...</span> <a href="http://www.somewhere.com" onmousedown="return somefunc('random','parm','values','SHXA213')">Click Me</a> <span>...and more conte...
I'm navigating XML document with XPathNodeIterator, and I want to change some nodes' values. I can't figure out how :( Here's the code I'm using: XPathDocument docNav = new XPathDocument(path); XPathNavigator nav = docNav.CreateNavigator(); nav.MoveToRoot(); XPathNodeIterator itemsIterator = nav.Select("/foo/bar/item"); while (medium...