 <p>Right before you call this function, add this line.</p> <pre><code>var xml = jQuery.parseXML(xml); </code></pre> <p><em>Note: you might have to play with variable names. Either way, the requirement is that the string must be converted to a <code>XMLObject</code>.</em></p> <p>See if that takes care of it for you.</p>