<?xml version="1.0" encoding="UTF-8"?> <message to="mbader.1@ej/14d5d1001b2b11e3bbf6406c8f2cc4bb" from="mam.ej" id="107f527e-1bd6-11e3-84d3-406c8f2cc4bb"> <result xmlns="urn:xmpp:mam:tmp" queryid="47e92a96-1bd6-11e3-89b9-406c8f2cc4bb-7" id="2013-09-11T11:36:15.008150Z-ejabberd@ej" /> <forwarded xmlns="urn:xmpp:forward:0"> <delay xmlns="urn:xmpp:delay" stamp="2013-09-11T11:36:15Z" from="ej" /> <message to="mbellizzi.1@ej" type="chat" from="mbader.1@ej/14d5d1001b2b11e3bbf6406c8f2cc4bb" id="107f527e-1bd6-11e3-84d3-406c8f2cc4bb" xml:lang="en"> <body>Test</body> <thread>1085be20-1bd6-11e3-84d3-406c8f2cc4bb</thread> <domain xmlns="http://imprivata.com/protocol/cortext">mpg.imprivata.com</domain> <request xmlns="urn:xmpp:receipts" /> <content xmlns="http://imprivata.com/protocol/cortext" mime-type="application/x-cortext-directory-information"> <Status>active</Status> <Family_Name>mbader.1</Family_Name> <Given_Name>test</Given_Name> </content> </message> </forwarded> </message>
Message_Result = Message["mam_result"].get_forwarded().xml
for i in Message_Result:
Xml = i
import sleekxmpp.stanza
Message = sleekxmpp.stanza.Message(xml=Xml)
Message.namespace = "urn:xmpp:forward:0"
<forwarded xmlns="urn:xmpp:forward:0">
<delay xmlns="urn:xmpp:delay" stamp="2013-09-12T11:40:49Z" from="ej" /> <message to="mbellizzi.1@ej" type="chat" from="mbader.1@ej/14d5d1001b2b11e3bbf6406c8f2cc4bb" id="0180fafa-1ef3-11e3-87a5-406c8f2cc4bb" xml:lang="en"> <body>Message1</body> <thread>0188f55c-1ef3-11e3-87a5-406c8f2cc4bb</thread>
<domain xmlns="http://imprivata.com/protocol/cortext">mpg.imprivata.com</domain> <request xmlns="urn:xmpp:receipts" /> <content xmlns="http://imprivata.com/protocol/cortext" mime-type="application/x-cortext-directory-information"> <Status>active</Status> <Family_Name>mbader.1</Family_Name> <Given_Name>test</Given_Name> </content> </message> </forwarded>
<message xmlns="jabber:client" from="mbader.1@ej" to="mbader.1@ej/14d5d1001b2b11e3bbf6406c8f2cc4bb" type="chat"> <sent xmlns="urn:xmpp:carbons:2">
<forwarded xmlns="urn:xmpp:forward:0">
<message xml:lang="en" to="mbellizzi.1@ej" type="chat" id="e0945dba-1ff0-11e3-900f-bc52b73f175b"> <body>Tech</body> <thread>ecf8dc80-1fe5-11e3-bcc8-406c8f2cc4bb</thread>
<domain xmlns="http://imprivata.com/protocol/cortext">mpg.imprivata.com</domain> <request xmlns="urn:xmpp:receipts" /> <content xmlns="http://imprivata.com/protocol/cortext" mime-type="application/x-cortext-directory-information"> <Status>active</Status> <Family_Name>mbader.1</Family_Name> <Given_Name>test</Given_Name> </content>
<delay xmlns="urn:xmpp:delay" from="ej" stamp="2013-09-17T23:29:48Z" /> </message> </forwarded> </sent> </message>but for some reason all sleek is giving me is this:
<message to="mbader.1@ej/14d5d1001b2b11e3bbf6406c8f2cc4bb" from="mbader.1@ej" type="chat"> <sent xmlns="urn:xmpp:carbons:2">
<forwarded xmlns="urn:xmpp:forward:0">
<message to="mbellizzi.1@ej" type="chat" xml:lang="en" id="e0945dba-1ff0-11e3-900f-bc52b73f175b"> <body>Tech</body> <thread>ecf8dc80-1fe5-11e3-bcc8-406c8f2cc4bb</thread>
<domain xmlns="http://imprivata.com/protocol/cortext">mpg.imprivata.com</domain> <request xmlns="urn:xmpp:receipts" /> <content xmlns="http://imprivata.com/protocol/cortext" mime-type="application/x-cortext-directory-information"> <Status>active</Status> <Family_Name>mbader.1</Family_Name> <Given_Name>test</Given_Name> </content>
<delay xmlns="urn:xmpp:delay" stamp="2013-09-17T23:29:48Z" from="ej" /> </message> </forwarded> </sent> </message>