Hello everybody.
I'm trying to extend several messages using smack library and I have
got a problem.
I can perfectly add an extension for a packet:
Message my_message = new Message();
my_message.setTo("[EMAIL PROTECTED]");
PacketExtension my_extension = new PacketExtension("my_element", "my
namespace");
my_message.addextension(my_extension);
SparkManager.getConnection().sendPacket();
JID receive this message and is able to show the XML text of this
message:
String xmlText = packet.toXML();
"<message ................>
<my_element xmlns="my namespace"/>
</message>"
But, how can I add attributes inside extension?. I mean, I want to
send this xml text after adding the extension:
"<message ................>
<my_element xmlns="my namespace">
<header my_header=................/>
<body>......................<body>
</my_element>
</message>"
Furthermore, how can I extend IQ messages and send them?.
Thank you, very much.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---