Questions tagged [xpathdocument]

.NET class that provides a fast, read-only, in-memory representation of an XML document by using the XPath data model

.NET class that provides a fast, read-only, in-memory representation of an XML document by using the XPath data model [MSDN]

31 questions
0
votes
1 answer

How to read the assembly name from a non SDK style csproj file in C# using XML?

My code is: var doc = new XPathDocument(projectFilePath); var nav = doc.CreateNavigator(); var nsmgr = new XmlNamespaceManager(nav.NameTable); nsmgr.AddNamespace("p", "http://schemas.microsoft.com/developer/msbuild/2003"); var assemblyName =…
mark
  • 59,016
  • 79
  • 296
  • 580
0
votes
1 answer

Editing a tag in XpathDocument in C#

I have XpathDocument object which has content like
murmansk
  • 845
  • 2
  • 11
  • 28
0
votes
1 answer

Error when I use XPath.XPathDocument() function

I'm using this code in my ASP.NET/VB.NET project: Dim sourceFile as String = "http://xml.weather.yahoo.com/forecastrss?p=94704" Dim xPath As New XPath.XPathDocument(sourceFile) and the second line gives the error: "Unable to connect to the remote…
hotcoder
  • 3,176
  • 10
  • 58
  • 96
0
votes
3 answers

How to estimate memory need by XPathDocument for a specific xml file

Is there any way to estimate the memory requirement for creating an XpathDocument instance based on the file size of the xml? XpathDocument xdoc = new XpathDocument(xmlfile); Is there any way to programmatically stop the process of creating the…
bill seacham
  • 48
  • 1
  • 3
0
votes
1 answer

How to save an XmlDocument object when you don't know path where it is getting stored?

I have one XPathDocument object. Which I convert to XmlDocument object using: XmlDocument xmldoc = new XmlDocument(); xmldoc.Load(doc.CreateNavigator().ReadSubtree()); Now I have updated this xmldoc object and trying to save using Save method.…
tomevika
  • 5
  • 4
0
votes
1 answer

C# does XPathDocument(Path) evaluate the whole path before returning the document?

my English is not he best, but it will work I think. Also I'm an absolut newcomer to C#. Given is the following code snippet: It has to open an XML-document, from which I KNOW that one of the nodes can be missintepreted, btw is really wrong. try …
0
votes
3 answers

WPF - Searching an XML doc for values using XMLTextReader

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…
John Batdorf
  • 2,502
  • 8
  • 35
  • 43
0
votes
3 answers

Parse XML document

I am trying to parse a remote XML document (from Amazon AWS): 011d32c5-4fab-4c7d-8785-ac48b9bda6da
user147215
0
votes
1 answer

How to convert from XslTransform of VS2003 to XslCompiledTransform of VS2005?

We are currently converting our project from VS2003 to VS2005 and I'm looking for the right way to convert the code using XslTransform to XslCompiledTransform. The changing the class name is not the big deal, but when it comes to…
gene
  • 2,098
  • 7
  • 40
  • 98
0
votes
2 answers

How to search XML Tags based on a dynamic Variable value using XPathDocument?

Below mentioned is a part of my XML: sVariableValue = "UniqueID02" UniqueID01 Some comments
user3363495
  • 155
  • 2
  • 10
0
votes
1 answer

How to search XML Tags based on a ID using XPathDocument?

Below mentioned is a part of my XML: UniqueID02 UniqueID01 Some comments Code1
user3363495
  • 155
  • 2
  • 10
0
votes
2 answers

Nodes sequence with options values

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

Concatenate two Node Set with XPath

Suppose I have this HTML file :
1 2
1 2
Aladdin Gallas
  • 701
  • 2
  • 12
  • 36
0
votes
1 answer

How to extract certain data from a XML document

Okay I'll try to explain this quick and as simple as I can... What I am trying to do is extract four different things from a xml... first off here is the url of the XML I am using, and from that url XML I am trying to display only the Name(Symbol),…
Matt McCarthy
  • 115
  • 1
  • 3
  • 12
0
votes
1 answer

Replacing all matching nodes in XML using XSLT

I wanted to replace all matching nodes in the xml-file. To the original xml:
Peter17
  • 3,052
  • 9
  • 47
  • 77