Class Namespace


  • public class Namespace
    extends Object
    supported sitemap formats: https://www.sitemaps.org/protocol.html#otherformats
    • Field Detail

      • SITEMAP_LEGACY

        public static final String[] SITEMAP_LEGACY
        Legacy schema URIs from prior sitemap protocol versions and frequent variants.
      • IMAGE

        public static final String[] IMAGE
      • VIDEO

        public static final String[] VIDEO
      • NEWS

        public static final String[] NEWS
      • MOBILE

        public static final String[] MOBILE
      • EMPTY

        public static final String EMPTY
        In contradiction to the protocol specification ("The Sitemap must ... [s]pecify the namespace (protocol standard) within the <urlset> tag."), some sitemaps do not define a (default) namespace. By accepting the "empty" namespace, you'll get URLs even from those sitemaps.
        See Also:
        Constant Field Values
      • RSS_2_0

        public static final String RSS_2_0
        RSS and Atom sitemap formats do not have strict definition. But if we do not parse as namespace aware, then RSS/Atom files that choose to use namespaces will break. The relaxed compromise for RSS/Atom is to always parse as "namespace aware", but we will only match elements by the localName, accepting any element namespace.
        See Also:
        Constant Field Values
      • SITEMAP_SUPPORTED_NAMESPACES

        public static final Set<String> SITEMAP_SUPPORTED_NAMESPACES
      • SITEMAP_EXTENSION_NAMESPACES

        public static final Map<Extension,​List<String>> SITEMAP_EXTENSION_NAMESPACES
    • Constructor Detail

      • Namespace

        public Namespace()
    • Method Detail

      • isSupported

        public static boolean isSupported​(String uri)
        Parameters:
        uri - URI string identifying the namespace
        Returns:
        true if namespace (identified by URI) is supported, false if the namespace is not supported or unknown