Hello.  I can send XMPP messages to the Google Talk client using the
API provided with GAE.  However, I'd like to send a link that people
can click on, as well as do some simple formatting.  These links
contain a lot of request parameters, so they are long and messy-
looking.  I'd prefer to hide that detail in an HTML anchor tag.  How
do I use the API to format a message to accomplish this?  Does the API
support generating messages with embedded XHTML as described in
http://xmpp.org/extensions/xep-0071.html  ?  Does the Google Talk
client recognize XHTML?  When building the Message, I've tried various
combinations of html and body tags in an attempt to make the resulting
Message look something like Example 1 in the document above.  If I
don't build the Message with .asXml(true) , then all the html tag
information gets printed in the Google Talk client as text.  If I try
to use .asXml(true), then that section of the message body is ignored
in the Google Talk client.      For example, I try generating message
text as follows:

    StringBuilder buffer = new StringBuilder(); // Will hold message
text
    buffer.append("<html xmlns=\"http://jabber.org/protocol/xhtml-im
\">");
    buffer.append("<body xmlns=\"http://www.w3.org/1999/xhtml\";>");
    // ...   some XHTML is generated here, including <a></a>
tags ...
    buffer.append("</body>");
    buffer.append("</html>");

The toString() result of this buffer is then fed in as messageText
in :

Message msg = new MessageBuilder()
        .withRecipientJids(jid)
        .withBody(messageText)
 //       .asXml(true)
        .build();

(The code just follows the examples in the documentation.  Note
asXml(true) was commented out).

 The result in the Google Talk client doesn't recognize the XHTML, so
it looks too messy.









-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to