473,327 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Conversion from XPathNavigator or XPathNodeIterator to XmlDocument?

Hello!

I would like to do the following:
Use an XPathExpression to extract a nodeset from either an XmlDocument
or an XPathDocument. I would later like to be able to add any one of
these nodes to an XmlDocument.

Is there a straightforward way to take the XPathNavigator that can be
returned which points to each of the nodes and convert it into an
XmlNode?

Thanks in advance.
Nov 11 '05 #1
2 7171
Nope, unfortunately there is no such thing in this version of the Framework
:(

--
HTH
Christoph Schittko [MVP]
Software Architect, .NET Mentor

"Daniel Smith" <da**@actional.com> wrote in message
news:1f*************************@posting.google.co m...
Hello!

I would like to do the following:
Use an XPathExpression to extract a nodeset from either an XmlDocument
or an XPathDocument. I would later like to be able to add any one of
these nodes to an XmlDocument.

Is there a straightforward way to take the XPathNavigator that can be
returned which points to each of the nodes and convert it into an
XmlNode?

Thanks in advance.

Nov 11 '05 #2
Daniel Smith wrote:
Is there a straightforward way to take the XPathNavigator that can be
returned which points to each of the nodes and convert it into an
XmlNode?


If given XPathNavigator is navigating over XmlDocument, then you can get
underlying XmlNodes via IHasXmlNode interface (see msdn for more info).
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Nov 11 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Obe | last post by:
PLEASE HELP! I'm writing a function to populate DropDownLists from and xml file. I am having a problem getting my XPathNavigator to select any nodes when I attach a schema to my xml document. ...
3
by: Alexander Gräf | last post by:
Hello, I'm stuck with a simple problem, for which I don't have a solution. I basically have an XML file containing fragments of plain text and html, in several languages: <?xml version="1.0"...
4
by: David | last post by:
I'm using an XPathNodeIterator to select an element in an XML document that contains text I am going to put in a label on an aspx page. I want to be able to include HTML tags in the text read...
12
by: David Thielen | last post by:
Hi; I have an element: <space> </space> When I call SelectSingleNode() on it, the InnerXml is a 0 length String, not a String containing 1 space. Any ideas?
4
by: Andy Fish | last post by:
Hi, I can't figure out for the life of me how to select nodes using a namespace in XpathNavigator. For example: XPathDocument doc = new XPathDocument("file.xml"); XPathNavigator nav =...
11
by: ericms | last post by:
Can anybody show me how to insert a CDATA section using XPathNavigator ? I have tried the follwing with no luck: XmlDocument docNav = new XmlDocument(); docNav.LoadXml(xmlString);...
2
by: Jiho Han | last post by:
I have an xml document as follows: <?xml version="1.0" encoding="utf-8" ?> <entityConfiguration xmlns="http://schemas.infinityinfo.com/entityconfiguration" version="1.0"> <entity...
1
by: WestyCHC | last post by:
Morning all from a newbie. I have recently written an automation program (my first ever program) for testing and now I am trying to read XML data and assign the values to variables (rather than...
6
by: Kindler Chase | last post by:
I'm trying to iterate through a set of nodes and then edit/delete specific attributes using XPathNodeIterator. Adding attributes is no problem. My first question is how do I delete an attribute...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.