Add Atom lang support

This commit is contained in:
Cj Malone 2016-07-20 13:26:40 +01:00
parent 3bc51b7a54
commit 96468f0e85
1 changed files with 6 additions and 0 deletions

View File

@ -45,6 +45,12 @@ public class TypeGetter {
case ATOM_ROOT: case ATOM_ROOT:
feed.setType(Feed.TYPE_ATOM1); feed.setType(Feed.TYPE_ATOM1);
Log.d(TAG, "Recognized type Atom"); Log.d(TAG, "Recognized type Atom");
String strLang = xpp.getAttributeValue("http://www.w3.org/XML/1998/namespace", "lang");
if (strLang != null) {
feed.setLanguage(strLang);
}
return Type.ATOM; return Type.ATOM;
case RSS_ROOT: case RSS_ROOT:
String strVersion = xpp.getAttributeValue(null, "version"); String strVersion = xpp.getAttributeValue(null, "version");