mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-26 14:02:06 +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:
parent
f0d729ef52
commit
238ce7aac3
1 changed files with 4 additions and 3 deletions
|
@ -36,13 +36,14 @@ public class ItemProvider implements PacketExtensionProvider
|
||||||
public PacketExtension parseExtension(XmlPullParser parser) throws Exception
|
public PacketExtension parseExtension(XmlPullParser parser) throws Exception
|
||||||
{
|
{
|
||||||
String id = parser.getAttributeValue(null, "id");
|
String id = parser.getAttributeValue(null, "id");
|
||||||
|
String node = parser.getAttributeValue(null, "node");
|
||||||
String elem = parser.getName();
|
String elem = parser.getName();
|
||||||
|
|
||||||
int tag = parser.next();
|
int tag = parser.next();
|
||||||
|
|
||||||
if (tag == XmlPullParser.END_TAG)
|
if (tag == XmlPullParser.END_TAG)
|
||||||
{
|
{
|
||||||
return new Item(id);
|
return new Item(id, node);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -96,10 +97,10 @@ public class ItemProvider implements PacketExtensionProvider
|
||||||
}
|
}
|
||||||
tag = parser.next();
|
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 {
|
else {
|
||||||
return new PayloadItem<PacketExtension>(id, PacketParserUtils.parsePacketExtension(
|
return new PayloadItem<PacketExtension>(id, node, PacketParserUtils.parsePacketExtension(
|
||||||
payloadElemName, payloadNS, parser));
|
payloadElemName, payloadNS, parser));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue