Hi Doug,
Thanks for your reply.
As far as I know, we have four choices for your scenario.
(DataSet/DataTable, XMLDocument/ XmlReader, XMLDataDocument, XML
Serialization). DataSet is the way to represent data as relational view
and XMLDocument is another way to represent data as hieratical view.
Additionally, the XmlDataDocument class is derived from the XmlDocument
class, providing a hierarchical view of data as well as a relational view
by binding it to a DataSet. The primary purpose of XML serialization in the
..NET Framework is to enable the conversion of XML documents and streams to
common language runtime objects and vice versa.
In general, I would like to suggest you consider using DataSet/DataTable,
but it seems like your current standards restrict you from
DataSet/DataTable. However, now, the choices for us are
XMLDocument/XMLReader and XML serialization, as you said in initial post.
XMLTextReader is the fastest way to get the data via the pull-model XML
parsers.
I noticed there is a question very closed to your issue in WebQA article. I
highly recommend you may reference it.
http://msdn.microsoft.com/msdnmag/issues/02/12/webQA/
Q I'm looking for tips on getting the best performance from my use of the
System.Xml classes in an ASP.NET Web Service. Would I see a benefit from
long-term caching and reuse of System.Xml objects, like XmlDocument?
Additionally, you may meet an issue when using XmlDocument elements passed
to or returned from WebMethods. The following KB will tell the story for
you.
http://support.microsoft.com/kb/330600
Hope this helps. If you still have anything unclear, please feel free to
update here.
Have a great day,
Sincerely,
Wen Yuan