Created
March 3, 2010 08:12
-
-
Save enachb/320430 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import com.sun.istack.internal.Builder; | |
| def writer = new StringWriter() | |
| writer.append '<?xml version="1.0" encoding="UTF-8"?>' | |
| def builder = new groovy.xml.MarkupBuilder(writer) | |
| builder.urlset(xmlns:"http://www.sitemaps.org/schemas/sitemap/0.9") { | |
| url(){ | |
| loc("http://sguys.com/MyManualLink1") | |
| changefreq("weekkly") | |
| } | |
| url(){ | |
| loc("http://sguys.com/About") | |
| changefreq("weekly") | |
| } | |
| for (p in products) { | |
| url() { | |
| loc("http://sguys.com/$p.name") | |
| changefreq("daily") | |
| changed(new Date().format("yyyy-MM-dd")) | |
| } | |
| } | |
| } | |
| return writer.toString() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment