Im going to list some items from an xml file that looks like this:
<artist href="spotify:artist:1gR0gsQYfi6joyO1dlp76N">
<name>Justice</name>
<popularity>0.59872</popularity>
</artist>
http://ws.spotification.com/search/1/artist?q=justice”rel=“nofollow”http://ws.spotification.com/search/1/artist?q=justice 。
我的法典认为:
var x=xmlDoc.getElementsByTagName("artist");
for (i=0;i<x.length;i++)
{
document.write("<tr><td>");
document.write(x[i].getElementsByTagName("name")[0].childNodes[0].nodeValue);
document.write("</td><td>");
document.write(x[i].getElementsByTagName("popularity")[0].childNodes[0].nodeValue);
document.write("</td><td>");
document.write(x[i].HOW DO I GET THE SPOTIFY URI);
document.write("</td></tr>");
}
document.write("</table>");
Everything works fine, except that I dont know how to get the spotify URL into a table