File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Bulk XML messages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Bulk XML messages" Watch "Bulk XML messages" New topic
Author

Bulk XML messages

Uma Reddy
Greenhorn

Joined: Apr 16, 2010
Posts: 4
I need design advice on how to bulk smaller XML messages into one big XML message. Basically, we have XML messages that are getting posted to a JMS Topic. When we have 500 messages in the JMS topic, we want to bulk these 500 messages into one big XML message and make one database call(batch update) instead of 500 calls. What are the best ways of doing this. Also, are there other ideas of achieving the same thing. Thanks in advance.
Ahmet Tapmaz
Greenhorn

Joined: Mar 02, 2011
Posts: 4
which parser are you using ? Dom parser , sax parser or another one
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
Sounds like you want to build the text of a new document with a root that contains all the little documents.

I would certainly treat this as a pure text manipulation problem - exactly how depends on the content of the small messages. Do they start with a declaration like:


if so you will need to trim that text - having one inside the big document will cause an error.

Bill
Uma Reddy
Greenhorn

Joined: Apr 16, 2010
Posts: 4
Thanks for the responses. We are using sax parser
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Bulk XML messages