I have asked our web support group to verify thier standards are current.
Current standards state "absolutely NO View State" and Datasets should NOT be
used for web service or any high performance tasks. Is their another option?
Recall, no direct access to RDBMS, just a pre-built and staged XML file to
filter on to send XML packet response.
doug
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
doug - 28 Mar 2007 14:36 GMT
Wen Yuan,
Okay, got web service loading up XML file into dataset and I can send
dataset back to new XML document and return that as my result.
I have 5 layers on my XML. Users will want to select specific level 2 and
level 3 nodes plus child nodes 4 and 5, and parent 1. They will be passing
in an XML packet that has filter criteria level2='6' and level3='B'. I
assume I will load this into dataset also and use the two datasets maybe as a
join where node level values are equal?
How do I select rows from the dataset?
So far, not much code. Very clean. I am enjoying the project.
doug
> Hi Doug,
> Thanks for your reply.
[quoted text clipped - 33 lines]
> Sincerely,
> Wen Yuan
WenYuan Wang [MSFT] - 29 Mar 2007 07:38 GMT
Hi Doug,
Thanks for your reply.
Dataset will load the xml file into datatables.
For each table, you can select the rows by the method DataTable.Select()
http://msdn2.microsoft.com/en-us/library/det4aw50.aspx
[DataTable.Select Method (String) ]
Additionally, get the rows( from Child/Parent table) related to your
selected rows.
DataRow.GetChildRows
http://msdn2.microsoft.com/en-US/library/hbt8xha8.aspx
DataRow.GetParentRows
http://msdn2.microsoft.com/en-us/library/7bssayw4.aspx
Hope this helps, please feel free to let me know if you still have anything
unclear. I'm glad to assist you.
Have a great day,
Sincerely,
Wen Yuan
doug - 29 Mar 2007 13:16 GMT
This is kind of what I imagined, but hoped it would be simplier. Will give
it a try.
Thanks.
> Hi Doug,
> Thanks for your reply.
[quoted text clipped - 17 lines]
> Sincerely,
> Wen Yuan