Prevented namespace URIs from being added more than once
This commit is contained in:
parent
21fd53c8bd
commit
ce0d14db42
|
@ -77,6 +77,7 @@ public class SyndHandler extends DefaultHandler {
|
|||
public void startPrefixMapping(String prefix, String uri)
|
||||
throws SAXException {
|
||||
// Find the right namespace
|
||||
if (!state.namespaces.containsKey(uri)) {
|
||||
if (uri.equals(NSAtom.NSURI)) {
|
||||
if (prefix.equals(DEFAULT_PREFIX)) {
|
||||
state.defaultNamespaces.push(new NSAtom());
|
||||
|
@ -90,7 +91,8 @@ public class SyndHandler extends DefaultHandler {
|
|||
state.namespaces.put(uri, new NSContent());
|
||||
if (AppConfig.DEBUG)
|
||||
Log.d(TAG, "Recognized Content namespace");
|
||||
} else if (uri.equals(NSITunes.NSURI) && prefix.equals(NSITunes.NSTAG)) {
|
||||
} else if (uri.equals(NSITunes.NSURI)
|
||||
&& prefix.equals(NSITunes.NSTAG)) {
|
||||
state.namespaces.put(uri, new NSITunes());
|
||||
if (AppConfig.DEBUG)
|
||||
Log.d(TAG, "Recognized ITunes namespace");
|
||||
|
@ -101,6 +103,7 @@ public class SyndHandler extends DefaultHandler {
|
|||
Log.d(TAG, "Recognized SimpleChapters namespace");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Namespace getHandlingNamespace(String uri) {
|
||||
Namespace handler = state.namespaces.get(uri);
|
||||
|
|
Loading…
Reference in New Issue