Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using XML for string message

 
Deepti Bhatia
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
XML is a string. There should be no restriction that stops you from passing XML there.
 
Deepti Bhatia
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic