Simple Sitemap Generator for Java.
See more details below: https://www.sitemaps.org/index.html
Apache 2.0
SitemapInfo info = new SitemapInfo();
SitemapInfoUrl url = new SitemapInfoUrl();
info.addUrl(url);
url.setLoc("http://example.com/");
url.setLastmod(new Date());
url.setChangefreq(SitemapInfoUrl.Changefreq.Daily);
url.setPriority("0.8");
new SitemapGenerator4j().write(info, new File("./sitemap.xml"));
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://example.com/</loc>
<lastmod>2020-04-08T23:55:55+09:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
</urlset>