@Override
    public void endElement(String uri, String localName, String qName)
            throws SAXException {
        super.endElement(uri, localName, qName);
        if (this.currentWebPage != null) {
            if (qName.equalsIgnoreCase(LOC)) {
                try {
                    currentWebPage.setLocation(new URL(characters));
                }
                catch (MalformedURLException murle) {
                    murle.printStackTrace();
                }
            }
            else if (qName.equalsIgnoreCase(LASTMOD)) {
                // The bellow formatter corresponds to "yyyy-MM-dd'T'HH:mm:ssZZ"
                DateTimeFormatter dtf = ISODateTimeFormat.dateTimeNoMillis();
                DateTime dt = dtf.parseDateTime(characters);
                currentWebPage.setLastModified(dt.toDate());
            }
            else if (qName.equalsIgnoreCase(CHANGEFREQ)) {
                currentWebPage.setChangeFrequency(characters);
            }
            else if (qName.equalsIgnoreCase(PRIORITY)) {
                currentWebPage.setChangeFrequency(characters);
            }
            else if (qName.equalsIgnoreCase(URL)) {
                webPages.add(currentWebPage);
            }
        }
    }