Generate HTML form with XML

S

Shahid

Hi,


I have an xml document, example below. I would like to create an HTML
form dynamically so all I would do is change the XML form in case a
different version comes.


I am relatively new to ASP.NET and any help would be greatly
appreciated.


Thanks,
Shahid


-----SAMPLE XML FILE------
<?xml version="1.0"?>
<notice>
<pre>
<topic>QPI</topic>
<version>1.0</version>
</pre>
<introduction>
<body>
<title>Introduction</title>
<p>The following conveys information for
choosing good passwords,
which will keep our systems and data secure.</p>
</body>
</introduction>
<question>
<number>1</number>
<name>Introduction</name>
<subQuestion>
<name>prepared for the call</name>
<value>5</value>
</subQuestion>
<subQuestion>
<name>spoke to appropriate person</name>
<value>5</value>
</subQuestion>
<subQuestion>
<name>proper representation</name>
<value>5</value>
</subQuestion>
</question>
<question>
<number>2</number>
<name>Rapport</name>
<subQuestion>
<name>was attempted</name>
<value>5</value>
</subQuestion>
<subQuestion>
<name>was appropriate</name>
<value>5</value>
</subQuestion>
<subQuestion>
<name>carried throughout the call</name>
<value>5</value>
</subQuestion>
<subQuestion>
<name>mirrored the customer</name>
<value>5</value>
</subQuestion>
</question>
</notice>
------------------------------­------------
 
G

Guest

If you don't want to use ASP.NET server control/PostToBack you can use
System.Xml.Xslt

Probably what you really want to do though is write a method that
deserializes that data and populates your ASP.NET Form as desired.

Hope that helps,

Jason Lind
 
S

Shahid

Thanks for the reply. Do you know of any examples similar to this or
tutorials?

Thanks again
Shahid
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,218
Latest member
JolieDenha

Latest Threads

Top