See: Description
Interface | Description |
---|---|
RsConstants |
Constants related to the representation of ResourceSync documents as xml.
|
Class | Description |
---|---|
ObjectFactory |
Factory class for creating the root elements of sitemaps: <urlset> and <sitemapindex>.
|
ResourceSyncContext |
JAXBContext for marshalling and unmarshalling of ResourceSync documents.
|
RsBuilder |
Utility class for building
RsRoot class hierarchies. |
RsItem<T extends RsItem> | |
RsLn | |
RsMd | |
RsRoot<T extends RsRoot,C extends RsItem> | |
Sitemapindex | |
SitemapItem | |
UrlItem | |
Urlset | |
ZonedDateTimeAdapter |
Adapter for conversion between a
ZonedDateTime and an ISO 8601 profile know as W3C Datetime format. |
Enum | Description |
---|---|
Capability |
A mandatory attribute in all ResourceSync documents.
|
The class RsBuilder
can be used to marshal and unmarshal
ResourceSync sitemap documents to and from a class hierarchy.
RsBuilder rsBuilder = new RsBuilder(new ResourceSyncContext()); Optional<RsRoot> maybeRoot = rsBuilder.setInputStream(inStream).build();
RsRoot
is the superclass of two classes that represent
the two possible root elements of a sitemap: <sitemapindex> and <urlset>: the classes
Sitemapindex
and Urlset
.
RsBuilder
can also be used to marshal a class hierarchy to its
xml-representation. Continuing from the previous example (and knowing the unmarshalled thing was a Urlset):
Urlset urlSet = rsBuilder.getUrlset().orElseThrow(RuntimeException::new); String xml = rsBuilder.toXml(urlSet, true);
Copyright © 2017. All rights reserved.