forked from mirror/monocles_chat_clean
Better handling of namespaced attributes
Don't store in the data model using the prefix -- the prefix is meaningless. Store by URI and then generate prefixes when serializing. (cherry picked from commit caf119b5b63bbc61976731c1cd4795d00e6851c9)
This commit is contained in:
parent
db7aab2439
commit
e38b4d9845
1 changed files with 0 additions and 6 deletions
|
@ -73,12 +73,6 @@ public class XmlReader implements Closeable {
|
|||
}
|
||||
tag.setAttribute(name,parser.getAttributeValue(i));
|
||||
}
|
||||
int nsStart = parser.getNamespaceCount(parser.getDepth()-1);
|
||||
int nsEnd = parser.getNamespaceCount(parser.getDepth());
|
||||
for (int i = nsStart; i < nsEnd; i++) {
|
||||
final var prefix = parser.getNamespacePrefix(i);
|
||||
tag.setAttribute("xmlns" + (prefix == null ? "" : ":" + prefix), parser.getNamespaceUri(i));
|
||||
}
|
||||
if (xmlns != null) {
|
||||
tag.setAttribute("xmlns", xmlns);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue