Author |
Message
|
Vijji |
Posted: Fri Aug 18, 2006 7:37 am Post subject: TDS set problem |
|
|
 Voyager
Joined: 30 Aug 2005 Posts: 83
|
Hi
I am providing XML message As input (<Data><ID>1234</ID><DEPT/><Name>hai</Name><Address/><phone>2345698</phone></Data>)
an my final output is TDS,in Input if i get any null values for "Dept" and "Address" tags then my out put should be like below:
ID;<Space>;Name;<Space>;Phone;
I want to achieve the output by setting properties in Message set not through ESQL.
I'm unable to put space for null values.Is it possible to fill the space with null values in TDS Set?
Thanks in advance,
vijji. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Aug 18, 2006 7:58 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Look up Null Handling in TDS in the Info Center. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Vijji |
Posted: Fri Aug 18, 2006 8:34 am Post subject: |
|
|
 Voyager
Joined: 30 Aug 2005 Posts: 83
|
Thanks for ur reply Jeff,
I set the below properties in MsgSet
In Representation of Null values:
Encoding Null : NullLiterralValue
Encoding NullValue: (set space in this)
But no use.Where i went wrong.Please let me know. |
|
Back to top |
|
 |
kimbert |
Posted: Sat Aug 19, 2006 12:49 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
I set the below properties in MsgSet |
You need to set up Null Handling properties for both input ( XML physical format ) and output ( TDS physical format ). So you need to be using MRM XML.
If you do not configure null handling for the XML parser, an empty element will be put into the message tree as an empty string. An empty string is not the same as a null value, so the TDS writer will not output your specified null literal value. |
|
Back to top |
|
 |
jefflowrey |
Posted: Sat Aug 19, 2006 4:30 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I thought XML was input and TDS was output? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Vijji |
Posted: Sun Aug 20, 2006 10:24 am Post subject: |
|
|
 Voyager
Joined: 30 Aug 2005 Posts: 83
|
Yes Jeff,My input was XML and TDS was output.
Kimbert,i have no chance to use XML MRM.My requirement is like that.
Thanks,
Vijji |
|
Back to top |
|
 |
kimbert |
Posted: Mon Aug 21, 2006 12:31 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
i have no chance to use XML MRM.My requirement is like that |
So which XML domain are you using, and why?
MRM XML is the only XML parser which can automatically put a null value in the message tree. So if you really cannot use MRM XML, then you must do some work in your message flow. Either
a) Write some ESQL to replace empty element values with null values. Use TDS null handling settings to output the spaces.
b) Forget about null handling options, and just replace empty element values with a single space.
I guess b) is simpler. |
|
Back to top |
|
 |
Vijji |
Posted: Mon Aug 21, 2006 5:00 am Post subject: |
|
|
 Voyager
Joined: 30 Aug 2005 Posts: 83
|
Thanks for ur replies
I'm using XML domain. |
|
Back to top |
|
 |
kimbert |
Posted: Mon Aug 21, 2006 5:07 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
I'm using XML domain. |
- Why not XMLNSC ( the recommended domain for XML parsing) ?
- Why not MRM XML? |
|
Back to top |
|
 |
Vijji |
Posted: Mon Aug 21, 2006 6:01 am Post subject: |
|
|
 Voyager
Joined: 30 Aug 2005 Posts: 83
|
Hi kimbert, I already told u na,i have no chance to use MRM XML.I'm working on MB5.0 so i have to use XMLNS.I guess there is no use with XMLNS for my requirment.
As per ur last post i'll achieve this tru ESQL only. |
|
Back to top |
|
 |
kimbert |
Posted: Mon Aug 21, 2006 6:50 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
I already told u na,i have no chance to use MRM XML |
That's OK. I was simply wondering why not. Sometimes this sort of feedback can be really useful. |
|
Back to top |
|
 |
|