Click here to Skip to main content
15,881,967 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi
Below is the XML structure

XML
<?xml version="1.0" encoding="utf-8" ?> 
<Salary>
    <empNo Required="true" List="false"></empNo> 
    <Basic Required="true" List="false">Basic Salary</Basic> 
    <HRA List="false">Housing Allow</HRA> 
    <TA List="false">TA</TA> 
    <Others List="true">Other Allowances</Others> 
    <Total List="false" Required="True">Total Salary</Total> 
    <Sex List="true">
    <Sex>
        <gender>Male</gender> 
        <gender>Female</gender> 
    </Sex> 
</Salary> 


I am having a requirement of Creating a Webform with the xml Nodes . The Form layout need to be generated by reading the xml structure. If the xml node contains the property list as true add the dropdown list ,If it contains list value as false add the textbox as input controls. The Values of the xml node elements values like’Housing Allow’ ,’TA’ should display as label in the form and need to add a submit button to save the Data.

Please guide me to do this..

Thanks
Posted
Updated 9-Aug-10 23:46pm
v3
Comments
#realJSOP 10-Aug-10 5:47am    
I fixed your XML. It contained several invalid characters as well as "gender" being misspelled for the "female" item. PAY ATTENTION TO WHAT YOU'RE DOING.

There are many approaches to doing what you need to do. This is where you use that skill you haven't developed yet - analysis. The XML you've provided is simple in its content, and it isn't that hard to work out what you need to do.

Beyond that, nobody here is going to actually write the code for you. If you make an attempt to write the code, and have a SPECIFIC problem, ask for help. Don't come here expecting us to write code for you, especially for free.
 
Share this answer
 
Thanks John, I know that there are many approaches to achieve this task thats where I am confused. Could you please let me know the best possible approach to do this.

Thanks again.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900