Author |
Message
|
KIT_INC |
Posted: Fri Jun 25, 2010 9:32 am Post subject: Delimiter of last element which happen to be blank |
|
|
Knight
Joined: 25 Aug 2006 Posts: 589
|
I am creating an All element delimited record for an input xml message
<Root_tag>
<ElementA>A</ElementA>
<ElementB>B</ElementB>
<ElementC>C</ElementC>
</ Root_tag>
The record I output is @A*B*C#
where @ is the group indicator, * is the eleemnt delimiter and # is the group terminator.
But if the last Last Element C contains nothing (i.e. <ElementC></ElementC>) , the ouptut becomes
@A*B#
Another programmer has a program to read my output. He is complaining that C is missing. He expects my output to be
@A*B*#
I did some testing. If B is missing instead of C, I got
@A**C#
So I expect the delimiter for B to show if C is not null. I run the broker trace. the trace shows that C has a value of '' when the input is
<ElementC></ElementC> (i.e. not null).
I have 'Suppress absent element delimiter' already set to 'never'.
Is there anyway that I can get the output ot show @A*B*# ? |
|
Back to top |
|
 |
Gaya3 |
Posted: Fri Jun 25, 2010 9:37 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
you can create a field after element C and dont populate anything,
this is just a work around. this will help you to get the expected output. _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
KIT_INC |
Posted: Fri Jun 25, 2010 10:31 am Post subject: |
|
|
Knight
Joined: 25 Aug 2006 Posts: 589
|
Thanks Gaya3, I thought about doing that too. I just want to be sure what I am getting is normal output from the broker and not because of any mis-configuration done by me. |
|
Back to top |
|
 |
Gaya3 |
Posted: Fri Jun 25, 2010 10:37 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
KIT_INC wrote: |
Thanks Gaya3, I thought about doing that too. I just want to be sure what I am getting is normal output from the broker and not because of any mis-configuration done by me. |
what you are currently getting is normal, and expected, inorder to change that, you have to create an additional field thats how i have done it _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
KIT_INC |
Posted: Fri Jun 25, 2010 10:44 am Post subject: |
|
|
Knight
Joined: 25 Aug 2006 Posts: 589
|
Thanks for the confirmation. I'll add the field |
|
Back to top |
|
 |
kimbert |
Posted: Sat Jun 26, 2010 12:53 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Gaya3 said:
Quote: |
what you are currently getting is normal, and expected, inorder to change that, you have to create an additional field thats how i have done it
|
Gaya3: Are you sure? If KIT_INC has set 'Suppress absent element delimiters' to 'never' then I reckon the delimiter for the missing C should be output. If not, then I'm not sure what that property is for.
Obviously, your workaround will do the trick, but it shouldn't be required. |
|
Back to top |
|
 |
KIT_INC |
Posted: Sat Jun 26, 2010 6:54 pm Post subject: |
|
|
Knight
Joined: 25 Aug 2006 Posts: 589
|
Thanks Kimbert. I have it working by adding a field as suggested by Gaya3. I am also interested in finding out what does setting 'Suppress absent element delimiter' set to 'never' do for me. But I am not sure how to 'debug' this. A user trace will not tell how the output is build. Will the service trace show this? |
|
Back to top |
|
 |
Gaya3 |
Posted: Mon Jun 28, 2010 5:33 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
kimbert wrote: |
Gaya3 said:
Quote: |
what you are currently getting is normal, and expected, inorder to change that, you have to create an additional field thats how i have done it
|
Gaya3: Are you sure? If KIT_INC has set 'Suppress absent element delimiters' to 'never' then I reckon the delimiter for the missing C should be output. If not, then I'm not sure what that property is for.
Obviously, your workaround will do the trick, but it shouldn't be required. |
i tested the same on my side too, its working for me, thanks Kimbert...i am trying to recollect the issue that i faced couple of months back regarding the same,
the output i was expecting is like this
a|b|c|
d|e|f|
g||
here i was not getting the pipe delimitter previously, so i made that work around to get the results  _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
|