Re: System.XML.XPath XPathDocument load question
- From: "Tony Girgenti" <tony(nospam)@lakesideos.com>
- Date: Thu, 17 Aug 2006 11:52:11 -0400
Hello Martin.
Thanks for the explanation. So i can navigate thru the document using the
xmldocument method.
That helps tremendously.
Thanks,
Tony
"Martin Honnen" <mahotrash@xxxxxxxx> wrote in message
news:uUMXysgwGHA.724@xxxxxxxxxxxxxxxxxxxxxxx
Tony Girgenti wrote:
I'm getting an XML document this way:
Dim node As XmlNode = proxy.RetrieveArchivedTrips(strDate, endDate)
Dim doc As XmlDocument = node.OwnerDocument
doc.AppendChild(node)
At this point "doc" contains the XML document that i am using. However,
i'm reading Beginning VB.NET XML. In all of the examples to use
XPathDocument, it always refers to a file on disk such as:
Dim xpDoc As XPathDocument = New XPathDocument("..\\CaseStudy.xml")
In the above statement, how do i get my "doc" to be used in place of
"..\\CaseStudy.xml" ?
XmlDocument and XPathDocument are two different classes but both implement
IXPathNavigable.
So usually all you do with xpDoc is e.g.
Dim navigator As XPathNavigator = xpDoc.CreateNavigator();
where you could simply do
Dim navigator As XPathNavigator = doc.CreateNavigator();
to get an XPathNavigator over your XmlDocument instance. The use of that
navigator is the same then, whether you created it from an XPathDocument
or XmlDocument instance.
Does that help? Or why exactly do you want/need to have an XPathDocument
when you already have an XmlDocument?
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
.
- References:
- System.XML.XPath XPathDocument load question
- From: Tony Girgenti
- Re: System.XML.XPath XPathDocument load question
- From: Martin Honnen
- System.XML.XPath XPathDocument load question
- Prev by Date: Re: System.XML.XPath XPathDocument load question
- Next by Date: RE: Detailed ASP.Net info not displaying in browser
- Previous by thread: Re: System.XML.XPath XPathDocument load question
- Index(es):
Relevant Pages
|