Response to Mike's blog: In need of Javascript assistance
Mike,
Reading your blog post, I did not quite understand what your problems were in parsing the xml. But, I am posting a small chunk of code that I used to parse my xml file. May be you can make use of this.
Basically, it strips off the Title elements from the xml (rerturned by your ISBN call) and creates an element node to display it in the HTML page. You can repeat this process for other elements that you have. Note that the DOM methods are case sensitive. So, double check the tag names you pass to these methods. Hope this helps.
// NOTE : you should have a div with an id resultArea in your html file
var resultTree = document.getElementById('resultArea');
// retrieve the title element
var titles=xmlDoc.getElementsByTagName('Title');
var title = titles[o].childNodes[0].nodeValue;
// create an element node
tempElementNode = document.createElement("h4");
// createa text node with the value extracted from title element
tempTextNode = document.createTextNode("Title : " + title);
// add the text node to the element node previously created
tempElementNode.appendChild(tempTextNode);
// add the resulting element to the result area ..so that
// the title is displayed in the screen
// NOTE : you should have a div with an id resultArea in your html file
resultTree.appendChild(tempElementNode);
Recent Comments
Tom on Response to Srikanth's comment, while reviewing MapYourBuddies: Thank you
Bud Gibson on Yes we are out there - something more to brag about !!! :-)): Great!
Bud Gibson on Response to Ratna's post- PHP file: Great work
Tom on Response to Tom's question: Thanks a l
Bud Gibson on Response to Srikanth's post: Obviously
srikanth leburu on Response to Srikanth's post: hi chidam,
Bud Gibson on Respose to Rajesh's question: great resp
Mike White on iteration1 by AJACS team: I was hopi
Bud Gibson on AJAX Development Vs Project Management methodologies ?: That's why