Q

Questions regarding XML for a decision making tool

I have to develop a decision making tool which will consist of questionnaires and the user has to rate every category. I have to use XML as data source and the changes made will be stored in the XML file. Some of my queries regarding this are:
1. I am using a tree view on the left side of the form to display the categories present in the XML file. I want to have details of that category and the questions to be displayed on the right side on clicking any of the node of the tree. Since, the questions will be different for each node present in the tree, can someone suggest me any way to achieve this. I think using a datagrid control for changing the questions on click of a tree view node will be an option. Please let me know if it is right.
2. If data grid control can be used is there someway that I can bind data from an XML file to the datagrid control and at the same time have the fields editable?
First, there's no easy way of having XML -> datagrid binding with editing capabilities. The only way you have here is using a DataSet loaded from a segment of the XML (the current set of questions) and bound to the datagrid. Placing the results back in the XML document is a matter of taking the XML back from the DataSet, locating the appropriate node in the XmlDocument and assigning its InnerXml.
The solution here depends on how you'll persist user choices when he moves from node to node. Is this all client-side until he clicks some Save button? If this is the case, you will have to do plenty of JavaScript. My guess is that it's not, and you're doing postbacks and reloading a panel or something. Using a datagrid bound to a dataset loaded from the XML for the current category questions is the easiest path, I think.
This was first published in August 2004

Dig deeper on Win Development Resources

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchCloudComputing

SearchSoftwareQuality

SearchSOA

TheServerSide

SearchCloudApplications

Close