mirror of
https://github.com/crawler-commons/crawler-commons
synced 2024-05-20 02:26:03 +02:00
SAX parser to stop URL at closing </loc> fixes #153
This commit is contained in:
parent
2c72ba8708
commit
7bf499a98a
|
@ -70,6 +70,10 @@ class XMLHandler extends DelegatorHandler {
|
|||
}
|
||||
|
||||
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
|
||||
// flush any unclosed or missing URL element
|
||||
if (loc.length() > 0 && ("loc".equals(qName) || "url".equals(qName))) {
|
||||
maybeAddSiteMapUrl();
|
||||
}
|
||||
}
|
||||
|
||||
public void endElement(String uri, String localName, String qName) throws SAXException {
|
||||
|
|
Loading…
Reference in New Issue