aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/de/pixart/messenger/xml/XmlReader.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/xml/XmlReader.java b/src/main/java/de/pixart/messenger/xml/XmlReader.java
index efd4dcc95..1de61e54c 100644
--- a/src/main/java/de/pixart/messenger/xml/XmlReader.java
+++ b/src/main/java/de/pixart/messenger/xml/XmlReader.java
@@ -65,11 +65,17 @@ public class XmlReader {
wakeLock.acquire();
if (parser.getEventType() == XmlPullParser.START_TAG) {
Tag tag = Tag.start(parser.getName());
+ final String xmlns = parser.getNamespace();
for (int i = 0; i < parser.getAttributeCount(); ++i) {
- tag.setAttribute(parser.getAttributeName(i),
- parser.getAttributeValue(i));
+ final String prefix = parser.getAttributePrefix(i);
+ String name;
+ if (prefix != null && !prefix.isEmpty() && !prefix.equals(xmlns)) {
+ name = prefix + ":" + parser.getAttributeName(i);
+ } else {
+ name = parser.getAttributeName(i);
+ }
+ tag.setAttribute(name, parser.getAttributeValue(i));
}
- String xmlns = parser.getNamespace();
if (xmlns != null) {
tag.setAttribute("xmlns", xmlns);
}