I am building a website. I have a database table that contains tips. The tips table is simple, it contains an ID column and a Tip column. I have a datareader to read the table and fill a datatable, however, I would rather have the datareader create a cached xml document. I know how to read an xml file into cache with code, but I would like for the datareader to create a cached xml document.

Does anyone know how to accomplish this task?

Thanks, Chester


If you want to avoid DB access for tips you can fill a dataset with a datatable containing the tips table for once and use save DataSet.WriteXML() to export the data to XML format. Then for re using you don't need to use XMLDocument or anything but you can directly use DataSet.ReadXML().

Loren Soth