I have an ASP.NET(vb) web application that currently uses xmlWriter(System.Xml) to create an XML document from a database query and write it to a file.

Now, I need to change this web application to use XPATH to grab data from other XML documents as well as database queries to create an XML document.

After reading a bit about XPATH, I am wondering if this is even possible.

I found this bit of info on .NET and XPath on another site:

XPathDocument: A high performance, read-only cache for processing XML documents and streams. XPathDocument uses the document object model (DOM)-based parsing model (loads the source XML into an in-memory tree structure) but does not implement the interfaces required to insert, to modify, or to delete nodes in an Extensible Markup Language (XML) document or stream.


Is XPathDocument what I need? From the description, it says it's read only. But I need to be able to use XPath to create an XML document.

Is there anything I am missing?

Thanks!