tags:

views:

58

answers:

1

Here's the Scenerio, I'm creating a simple app for my friend's website where his users could add image w/ a caption. The problem is My Friend's Webhost don't allow him to use server side scripts and Database. He is just allowed to insert javascript and HTLM on the site.

So I think the solution would be doing it in XML instead of Database and Instead of Serverside sripts I would use Javascript (JQuery) to parse an XML. Now the next question is how would I code it? I just know basic JQuery and Javascript.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

Jquery and XML

First Name



Last Name



Sex

Male
Female

Image URL



Description



I really need some good help out there!

Thank you!

+1  A: 

Here's an example parsing XML using jQuery

 $(request.responseXML).find("person").each(function() {

      var pointer= $(this);

      var data = {

          pointer.attr("FirstName"),
          pointer.attr("LastName"),
          pointer.attr("Sex"),
          pointer.attr("ImageURL"),
          pointer.attr("Description")

      };

  });
Sorantis