Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i am getting folllowing data from the server
<allstudents>
    <student>
        <rollno>8001</rollno>
        <name>AAAA</name>
    </student>
    <student>
        <rollno>8002</rollno>
        <name>BBBB</name>
    </student>
</allstudents>

i have html page containing div with id 'dvtbl'
now i want to generate the folllowing table inside of dvtbl
<table>
    <tr>
        <td><input type="checkbox" name="cbRoll" value="8001" id="cbRoll8001" /></td>
        <td>AAAA</td>
    </tr>
    <tr>
        <td><input type="checkbox" name="cbRoll" value="8002" id="cbRoll8002"/></td>
        <td>BBBB</td>
    </tr>
</table>

how do i do it using jquery? in the callback function of $.ajax ?
Posted

you should be able to use Jquery to parse the DOM
 
Share this answer
 
You can use jQuery.parseXML() : http://api.jquery.com/jQuery.parseXML/[^]
 
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