1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 20:12:07 +01:00

SMACK-415 Added code that was mistakenly removed to handle optional node attribute

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_0@13625 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
rcollier 2013-04-29 11:40:49 +00:00
parent f0d729ef52
commit 238ce7aac3

View file

@ -36,13 +36,14 @@ public class ItemProvider implements PacketExtensionProvider
public PacketExtension parseExtension(XmlPullParser parser) throws Exception
{
String id = parser.getAttributeValue(null, "id");
String node = parser.getAttributeValue(null, "node");
String elem = parser.getName();
int tag = parser.next();
if (tag == XmlPullParser.END_TAG)
{
return new Item(id);
return new Item(id, node);
}
else
{
@ -96,10 +97,10 @@ public class ItemProvider implements PacketExtensionProvider
}
tag = parser.next();
}
return new PayloadItem<SimplePayload>(id, new SimplePayload(payloadElemName, payloadNS, payloadText.toString()));
return new PayloadItem<SimplePayload>(id, node, new SimplePayload(payloadElemName, payloadNS, payloadText.toString()));
}
else {
return new PayloadItem<PacketExtension>(id, PacketParserUtils.parsePacketExtension(
return new PayloadItem<PacketExtension>(id, node, PacketParserUtils.parsePacketExtension(
payloadElemName, payloadNS, parser));
}
}