https://github.com/igapyon/sitemapgenerator4j
Sitemap Generator for Java.
https://github.com/igapyon/sitemapgenerator4j
generator java sitemap sitemap-builder sitemap-generator sitemap-xml xml
Last synced: 11 months ago
JSON representation
Sitemap Generator for Java.
- Host: GitHub
- URL: https://github.com/igapyon/sitemapgenerator4j
- Owner: igapyon
- License: apache-2.0
- Created: 2020-04-07T12:05:19.000Z (about 6 years ago)
- Default Branch: devel
- Last Pushed: 2020-10-13T20:59:22.000Z (over 5 years ago)
- Last Synced: 2025-02-24T11:18:48.661Z (over 1 year ago)
- Topics: generator, java, sitemap, sitemap-builder, sitemap-generator, sitemap-xml, xml
- Language: Java
- Size: 21.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sitemapgenerator4j
Simple Sitemap Generator for Java.
See more details below:
https://www.sitemaps.org/index.html
## License
Apache 2.0
## Usage
### Java source (input)
```java
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 file (output)
```xml
http://example.com/
2020-04-08T23:55:55+09:00
daily
0.8
```