XPathDocument

S

srikar

Hi,

I have a XmlDocument object out of which I have to create
the XPathDocument. How can I go about accomplishing this
task?

Any pointers are highly appreciated.

Thanks,
Srikar
 
B

Bret Mulvey [MS]

srikar said:
Hi,

I have a XmlDocument object out of which I have to create
the XPathDocument. How can I go about accomplishing this
task?

XmlDocument xdoc = new XmlDocument();
xdoc.Load(path);
XPathDocument xpath = new XPathDocument(new
XmlNodeReader(xdoc.DocumentElement));
 
G

Guest

Thankyou Bret ..... it worked great!!!

-----Original Message-----


XmlDocument xdoc = new XmlDocument();
xdoc.Load(path);
XPathDocument xpath = new XPathDocument(new
XmlNodeReader(xdoc.DocumentElement));


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top