Get XML data from Zoho Creator API

stebbzor

New Member
I am trying to use the Zoho Creator API to get an XML file with records that can be accessed within a new HTML document and have specific values from the XML file inserted. See code here in the jsfiddle http://jsfiddle.net/vm5m6/\[code\]if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safarixmlhttp=new XMLHttpRequest();}else{// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");} xmlhttp.open("GET","https://creator.zoho.com/api/xml/uownrealestate/view/Agent_Roster_View? authtoken=5a26809fa55ca7c47f8c263b11689152&scope=creatorapi",false);xmlhttp.send();xmlDoc=xmlhttp.responseXML; document.write("<table border='1'>");var x=xmlDoc.getElementsByTagName("record");for (i=0;i<x.length;i++) { document.write("<tr><td>");document.write(x.getElementsByTagName("value")[0].childNodes[0].nodeValue);document.write("</td><td>");}document.write("</table>");\[/code\]i was also considering using Google Fusion Tables to do this as well. If anyone has any suggestions for pulling very simple data from an easily organized external database please let me know.I also tried this but read somewhere that it will not work if the xml is on another domain\[code\] $(function() { var xml = 'https://creator.zoho.com/api/xml/uownrealestate/view/Agent_Roster_View?authtoken=5a26809fa55ca7c47f8c263b11689152&scope=creatorapi' $(xml).find("record").each(function() { var stateName = $(this).find("Agent_Name").text(); alert("State: " + stateName ); })}); \[/code\]
 
Back
Top