Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

com.zandero:sitemap

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

com.zandero:sitemap

sitemap reader and writer

  • 1.0
  • Source
  • Maven
  • Socket score

Version published
Maintainers
1
Source

sitemap

Simple sitemap.xml generator and reader for single sitemap.xml files.

Setup

<dependency>      
     <groupId>com.zandero</groupId>      
     <artifactId>sitemap</artifactId>      
     <version>1.0</version>      
</dependency>

Sitemap generator

SitemapGenerator generator = new SitemapGenerator("http://some.domain.com");

// build a page link
WebPage page = new WebPage("/this/site")
   .change(ChangeFrequency.daily)
   .modified(1476796504000L)
   .priority(0.6D);

// add new page to list  
generator.add(page);  

// generate list  
List<String> map = generator.generate();

Output

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
		<url>
			<loc>http://some.domain.com/this/site</loc>
			<lastmod>2016-10-18T15:15:04.000Z</lastmod>
			<changefreq>daily</changefreq>
			<priority>0.6</priority>
		</url>
</urlset>

Sitemap reader

Reads in a given XML file or String and de-serializes it to list of WebPages

SitemapReader reader = new SitemapReader();
List<WebPage> pages = reader.read(sitemap);

FAQs

Package last updated on 09 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc