Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Intelligent Parser

Status
Not open for further replies.

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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top