Hi,

First of all, you should try upgrading to the newest Jabber API, 0.8a3 last
time I released it and if my memory serves me correctly.

Second of all, there is a method inside Muse Jabber that allows you to set
the XHTML text for the message you're sending.  Note that the forum message
link you wrote in your previous is a rather old format and is not longer
valid.  The new XHTML has its own X namespace to put the XHTML text in

Because XHTML is part of the X Namespace and is not normally used, you will
have to create an instance of your own message object and send it manually
rather than going through the JabberChatService.  You should read the
javadocs for JabberChatService as well as
JabberChatService.sendPrivateMessage(). It will tell you what to do.

But as a summary,

1) Instantiate a JabberChatMessage, set it's properties and fields (you can
check out the code for JabberChatService.sendPrivateMessage() to see what
kind of fields are set).  You should set the asynchronicity of the message
(normally it's send asynchronously).

2) you should call JabberChatMessage.setHTMLBody() to set the XHTML text to
send.

3) Then you simply send the message through JabberSession.sendMessage().

That's pretty much it.

Hope it helps.

Chris

----- Original Message -----
From: "Cunningham, Steven" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 12, 2003 1:04 PM
Subject: RE: [JDEV] Formatting a message sent via Java


> The library I'm using is muse-0.72.jar, the com.echomine.jabber class.
> Not sure about the XML.
> The extent of formatting I've seen is links being generate from plain
> text.
> I only have 1 persion on my list (fellow co-worker) so I haven't had a
> round experience with Exodous yet.
>
> Steven Cunningham
> Database Management Group
> Liberty Mutual
>
>
> -----Original Message-----
> From: Matthew A. Miller [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 12, 2003 3:46 PM
> To: JDEV Mailing List
> Subject: Re: [JDEV] Formatting a message sent via Java
>
>
> What would help me to help you is if you could provide the following:
> -  What library are you using, or are you doing this "from scratch"?
> -  What is the XML that's being transmitted across the wire?
> -  Can you receive rich-text from other people?
>
>
> Thanks,
>
> -  LW
>
> On Tue, 2003-08-12 at 13:03, Cunningham, Steven wrote:
> > I'm sending jabber messages via Java, and wanted to know if there's
> > anyway way to format these messages in an html or likewise format.
> >
> > I'm running the Exodous client.
> >
> > I tried html, and that didn't work.
> > I also tried what was listed at the following url, but that was
> > unsucessful.
> > http://mailman.jabber.org/pipermail/jdev/2000-September/002876.html
> >
> > Steven Cunningham
> > Database Management Group
> > Liberty Mutual
> >
>
> _______________________________________________
> jdev mailing list
> [EMAIL PROTECTED]
> http://mailman.jabber.org/listinfo/jdev
> _______________________________________________
> jdev mailing list
> [EMAIL PROTECTED]
> http://mailman.jabber.org/listinfo/jdev
>


_______________________________________________
jdev mailing list
[EMAIL PROTECTED]
http://mailman.jabber.org/listinfo/jdev

Reply via email to