Reputation: 4393
I have a static method that converts a html file and returns an XMLDocument object.
After doing extensive research, the following question has arised:
Can pass an XMLDocument object to a XPathDocument object, to make it easy when simply reading data from the document and not editing it.
Please reply and let me know if this is possible? If so, how?
Cheers.
Upvotes: 1
Views: 1729
Reputation:
How are you reading data from the document? Both XmlDocument
and XPathDocument
have a CreateNavigator
method that returns an XPathNavigator
for reading the document. Otherwise, just stream the XmlDocument
into a MemoryStream
and create the XPathDocument
from that.
Upvotes: 1