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. But it expects a string
which I don't know.
How should I save my changes to this? Please suggest. Thanks.
Try this:
XPathDocument result = new XPathDocument((doc.CreateNavigator().ReadSubtree()));