Created
May 15, 2014 17:22
-
-
Save el3ment/6bc5e47d2e69570c1ab9 to your computer and use it in GitHub Desktop.
Create list of links from XML Sitemap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var html = ""; | |
var links = []; | |
$('url loc').each(function(i, e){ | |
links.push(e.innerHTML); | |
}); | |
links.sort(); | |
$(links).each(function(i, e){ | |
html += "<li><a href='"+e+"'>"+e.replace("http://www.lonestarpercussion.com/", "").replace("/", " / ").replace(/\-/g, " ").replace(/ ?\/ ?$/,"")+"</a></li>"; | |
}); | |
$('urlset').html(html); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment