android:如何在xmpp中向body的子元素添加属性

时间:2015-09-02 12:28:30

标签: android xmpp asmack

我想在XMPP中发送一条消息,就像这样:

<message from='86@this' to='861@this' type='chat'>
<body>
 <number id=279
      title='hi'
      word='hello boy'/>
</body>
</message>

2 个答案:

答案 0 :(得分:0)

修改MessagetoXML()方法

if(defaultBody != null){
      buf.append("<body>);
        if(number != null){
           buf.append("<number").append("id=\"").append(id).append("\"").append("/>");
        }
  }

这样添加,我希望它能帮到你..谢谢..

答案 1 :(得分:0)

RFC 6120/6121禁止az storage file upload-batch --connection-string "DefaultEndpointsProtocol=https;AccountName=asdadasd;AccountKey=ahdsidyagdasgdhasdghdgasdasjdag4857348574;EndpointSuffix=core.windows.net" --destination <share-name> --source /dfiles/folder 中的元素。将数据放入自定义扩展元素中。

相关问题