Commit 6d1ed2ce authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Don't include namespaces "jabber:client", "jabber:server" or "jabber:component:accept". JM-6


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@1370 b35dd754-fafc-0310-a699-88a17e54d16e
parent dabfef94
......@@ -315,13 +315,17 @@ public class XPPPacketReader {
case XmlPullParser.START_TAG: {
QName qname = (pp.getPrefix() == null) ? df.createQName(pp.getName(), pp.getNamespace()) : df.createQName(pp.getName(), pp.getPrefix(), pp.getNamespace());
Element newElement = null;
if ("jabber:client".equals(qname.getNamespaceURI())) {
// Do not include the namespace if this is the start tag of a new packet
// This avoids including "jabber:client", "jabber:server" or
// "jabber:component:accept"
if ("jabber:client".equals(qname.getNamespaceURI()) ||
"jabber:server".equals(qname.getNamespaceURI()) ||
"jabber:component:accept".equals(qname.getNamespaceURI())) {
newElement = df.createElement(pp.getName());
}
else {
newElement = df.createElement(qname);
}
// Element newElement = DocumentHelper.createElement(pp.getName());
int nsStart = pp.getNamespaceCount(pp.getDepth() - 1);
int nsEnd = pp.getNamespaceCount(pp.getDepth());
for (int i = nsStart; i < nsEnd; i++)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment