| java.lang.Object org.xml.sax.helpers.DefaultHandler de.anomic.data.SitemapParser
SitemapParser | public class SitemapParser extends DefaultHandler (Code) | | Class to parse a sitemap file.
An example sitemap file is depicted below:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://www.example.com/</loc>
<lastmod>2005-01-01</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
</urlset>
A real example can be found here: http://www.xt-service.de/sitemap.xml
An example robots.txt containing a sitemap URL: http://notepad.emaillink.de/robots.txt
See Also: Protocol See Also: at sitemaps.org http://www.sitemaps.org/protocol.php See Also: Protocol See Also: at google.com https://www.google.com/webmasters/tools/docs/en/protocol.html |
SITEMAP_URLSET | final public static String SITEMAP_URLSET(Code) | | |
SITEMAP_URL_CHANGEFREQ | final public static String SITEMAP_URL_CHANGEFREQ(Code) | | |
SITEMAP_URL_LASTMOD | final public static String SITEMAP_URL_LASTMOD(Code) | | |
SITEMAP_URL_LOC | final public static String SITEMAP_URL_LOC(Code) | | |
SITEMAP_URL_PRIORITY | final public static String SITEMAP_URL_PRIORITY(Code) | | |
XMLNS_SITEMAPS_GOOGLE | final public static String XMLNS_SITEMAPS_GOOGLE(Code) | | |
XMLNS_SITEMAPS_ORG | final public static String XMLNS_SITEMAPS_ORG(Code) | | |
characters | public void characters(char[] buf, int offset, int len) throws SAXException(Code) | | |
getProcessedLength | public long getProcessedLength()(Code) | | the amount of bytes of the sitemap file that were downloaded so far |
getTotalLength | public long getTotalLength()(Code) | | the total length of the sitemap file in bytes or -1 if the length is unknown |
getUrlcount | public long getUrlcount()(Code) | | the amount of URLs that were successfully enqueued so far |
parse | public void parse()(Code) | | Function to download and parse the sitemap file
|
Methods inherited from org.xml.sax.helpers.DefaultHandler | public void characters(char ch, int start, int length) throws SAXException(Code)(Java Doc) public void endDocument() throws SAXException(Code)(Java Doc) public void endElement(String uri, String localName, String qName) throws SAXException(Code)(Java Doc) public void endPrefixMapping(String prefix) throws SAXException(Code)(Java Doc) public void error(SAXParseException e) throws SAXException(Code)(Java Doc) public void fatalError(SAXParseException e) throws SAXException(Code)(Java Doc) public void ignorableWhitespace(char ch, int start, int length) throws SAXException(Code)(Java Doc) public void notationDecl(String name, String publicId, String systemId) throws SAXException(Code)(Java Doc) public void processingInstruction(String target, String data) throws SAXException(Code)(Java Doc) public InputSource resolveEntity(String publicId, String systemId) throws IOException, SAXException(Code)(Java Doc) public void setDocumentLocator(Locator locator)(Code)(Java Doc) public void skippedEntity(String name) throws SAXException(Code)(Java Doc) public void startDocument() throws SAXException(Code)(Java Doc) public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException(Code)(Java Doc) public void startPrefixMapping(String prefix, String uri) throws SAXException(Code)(Java Doc) public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException(Code)(Java Doc) public void warning(SAXParseException e) throws SAXException(Code)(Java Doc)
|
|
|