Top add

Jquery to read from xml

  1. Include the jquery in your page
  2. Validate the xml using online xml validators
  3. Use the jquery.get() to get all the data from the xml
    example:
    $('Contact',xml).each(function() {
    srno = parseInt($(this).find("srno").text());
    empId = $(this).find("empid").text();
    name = $(this).find("name").text();
    contact = $(this).find("contact-data").text();
    type = $(this).find("type").text(); }

  4. The xml data are read and shown as html using jquery
  5. To add new date use the function $('#idSave').click() to delete use deleteRow and to edit editrow
Download the source file here . Files has custom.js which has add/edit and delete function . Please run contact.html to see the output



1 comment:

author said...

Great article on top orthopedic doctors in Hyderabad! Finding the right specialist for joint pain or injuries can be challenging, so this kind of curated list is really helpful. I also came across this resource that explains advanced regenerative treatments for orthopedic conditions