Guest_imported
New member
- Jan 1, 1970
- 0
I have a sample xml file as below:
<biodata>
<name>krisa</name>
<address>
<street>abcd</street>
<zipcode>12345</zipcode>
<country>usa</country>
</address>
<sex>
<male>false</male>
<female>true</female>
</sex>
</biodata>
I need to create a dynamic parser which will read each node and analyze whether the node can be represented as an inputbox, checkbox, listbox, radio button and etc(basic widgets in html) based on the xml structure.
For example(1),
..
<sex>
<male>false</male>
<female>true</female>
</sex>
..
can be represented as 2 radio buttons since the nodes having true/false value but the element names are different.
Another example(2),
..
<income>
<currency>usd</currency>
<currency>krone</currency>
<currency>yen</currency>
</income>
..
can be represented as a list box since the nodes(elements) are repeating and having same name.
Does anyone have any idea how to create this type of parser using XML DOM in ASP on the fly? The xml structure is dynamic and not fixed to any dtd. The parser must analyze the xml structure before creating the best widget for a particular structure
Your kind help is very much appreciated. Thank you in advance.
<biodata>
<name>krisa</name>
<address>
<street>abcd</street>
<zipcode>12345</zipcode>
<country>usa</country>
</address>
<sex>
<male>false</male>
<female>true</female>
</sex>
</biodata>
I need to create a dynamic parser which will read each node and analyze whether the node can be represented as an inputbox, checkbox, listbox, radio button and etc(basic widgets in html) based on the xml structure.
For example(1),
..
<sex>
<male>false</male>
<female>true</female>
</sex>
..
can be represented as 2 radio buttons since the nodes having true/false value but the element names are different.
Another example(2),
..
<income>
<currency>usd</currency>
<currency>krone</currency>
<currency>yen</currency>
</income>
..
can be represented as a list box since the nodes(elements) are repeating and having same name.
Does anyone have any idea how to create this type of parser using XML DOM in ASP on the fly? The xml structure is dynamic and not fixed to any dtd. The parser must analyze the xml structure before creating the best widget for a particular structure
Your kind help is very much appreciated. Thank you in advance.