use of de.danoeh.antennapod.parser.feed.namespace.Atom in project AntennaPod by AntennaPod.
the class AtomTextTest method testProcessingHtml.
@Test
public void testProcessingHtml() {
for (String[] pair : TEST_DATA) {
final AtomText atomText = new AtomText("", new Atom(), AtomText.TYPE_HTML);
atomText.setContent(pair[0]);
assertEquals(pair[1], atomText.getProcessedContent());
}
}
use of de.danoeh.antennapod.parser.feed.namespace.Atom in project AntennaPod by AntennaPod.
the class SyndHandler method startPrefixMapping.
@Override
public void startPrefixMapping(String prefix, String uri) throws SAXException {
// Find the right namespace
if (!state.namespaces.containsKey(uri)) {
if (uri.equals(Atom.NSURI)) {
if (prefix.equals(DEFAULT_PREFIX)) {
state.defaultNamespaces.push(new Atom());
} else if (prefix.equals(Atom.NSTAG)) {
state.namespaces.put(uri, new Atom());
Log.d(TAG, "Recognized Atom namespace");
}
} else if (uri.equals(Content.NSURI) && prefix.equals(Content.NSTAG)) {
state.namespaces.put(uri, new Content());
Log.d(TAG, "Recognized Content namespace");
} else if (uri.equals(Itunes.NSURI) && prefix.equals(Itunes.NSTAG)) {
state.namespaces.put(uri, new Itunes());
Log.d(TAG, "Recognized ITunes namespace");
} else if (uri.equals(SimpleChapters.NSURI) && prefix.matches(SimpleChapters.NSTAG)) {
state.namespaces.put(uri, new SimpleChapters());
Log.d(TAG, "Recognized SimpleChapters namespace");
} else if (uri.equals(Media.NSURI) && prefix.equals(Media.NSTAG)) {
state.namespaces.put(uri, new Media());
Log.d(TAG, "Recognized media namespace");
} else if (uri.equals(DublinCore.NSURI) && prefix.equals(DublinCore.NSTAG)) {
state.namespaces.put(uri, new DublinCore());
Log.d(TAG, "Recognized DublinCore namespace");
} else if (uri.equals(PodcastIndex.NSURI) || uri.equals(PodcastIndex.NSURI2) && prefix.equals(PodcastIndex.NSTAG)) {
state.namespaces.put(uri, new PodcastIndex());
Log.d(TAG, "Recognized PodcastIndex namespace");
}
}
}
Aggregations