correction on getNamespace parser

This commit is contained in:
REAndroid 2023-04-16 21:38:34 +02:00
parent fe0ec339ff
commit 9d0a62444c

View File

@ -379,17 +379,17 @@ public class ResXmlPullParser implements XmlResourceParser {
}
@Override
public String getNamespacePrefix(int pos) throws XmlPullParserException {
ResXmlAttribute attribute = getResXmlAttributeAt(pos);
if(attribute!=null){
return attribute.getNamePrefix();
ResXmlElement element = getCurrentElement();
if(element!=null){
return element.getStartNamespaceList().get(pos).getPrefix();
}
return null;
}
@Override
public String getNamespaceUri(int pos) throws XmlPullParserException {
ResXmlAttribute attribute = getResXmlAttributeAt(pos);
if(attribute!=null){
return attribute.getUri();
ResXmlElement element = getCurrentElement();
if(element!=null){
return element.getStartNamespaceList().get(pos).getUri();
}
return null;
}