wood burning stoves 2.0*
The moose likes Groovy and the fly likes XMLStream Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Groovy
Bookmark "XMLStream" Watch "XMLStream" New topic
Author

XMLStream

Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 629
Hi All,

I basically got an output in the form of an XML and I am trying to send it as an XML Stream. That is what I was told, to send it as an XML Stream. I dunno what that exactly means. I created the XML document using Groovy's MarkupBuilder. Can someone please tell me what an XML Stream means and how that can be done in Groovy?/

Thanks.


Be Humble... Be Nice.
Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 629
Okie.. I was able to create an XML using StreamingMarkupBuilder too. But still dunno what to do abt the XMLStream thing.

Thanks.
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

Originally posted by Arjun Reddy:
That is what I was told, to send it as an XML Stream. I dunno what that exactly means.

Why don't you ask the person who told you this what they meant? Go right to the source.


A good workman is known by his tools.
Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 629
Okie will do that.
Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 629
Um... I think I understand now what he meant. He meant that the JMS message(XML Message) from the sender to the receiver should be a StreamMessage. I got the XML using the StreamingMarkupBuilder. Now how do I convert it to a Stream Message?/

Thanks.
Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 629
Okie.. I don't know if it's correct but this just occurred to me. The xml I got from StreamingMarkupBuilder, it can be converted to a String object and so am going to do this,

StreamMessage.writeString(String value). So, this will be the message to the receiver's onMessage method. I hope it's correct.

Thanks.
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

I think you're now doing exactly what was expected.

Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 629
Yes it worked.

Thanks.
[ November 04, 2008: Message edited by: Arjun Reddy ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XMLStream