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

Using XML for string message

Deepti Bhatia
Greenhorn

Joined: Oct 19, 2006
Posts: 25
Hi,

We have to design our application to communicate to other java system with string messages. Could you guide if we can use XML to validate the message length , indivisual parameters rather than having string comparision coded for huge message.

Regards,
Duc Vo
Ranch Hand

Joined: Nov 20, 2008
Posts: 254
XML is a string. There should be no restriction that stops you from passing XML there.


“Everything should be as simple as it is, but not simpler.” Albert Einstein
Deepti Bhatia
Greenhorn

Joined: Oct 19, 2006
Posts: 25
Ok...and what about the XML tags. When the XML is formed they are part of it.The string message that we have would be something like eg : FULLNAME length 10, FirstName length 7.

Request message - FULLNAME00DRAGO00. something like. How do we get this from an XML. Am very new to XML can you guide.

Regards,
Sergey Arnaut
Greenhorn

Joined: Nov 03, 2008
Posts: 7
Why cant you use xsd schema? It can define the max and min length of element text and attribute. Or you can possibly use DTD.
And the most "stupid" variant. Every time you pass the XML you can add "rule" tags, for example:

[ November 25, 2008: Message edited by: Sergey Arnaut ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using XML for string message
 
Similar Threads
Generate xml on fly
Mapping XML to string message
XML Generator
Some XML parser /String handling --Which is better?
Creating a JMS TextMessage From XML