Author |
Message
|
amiivas |
Posted: Fri Dec 18, 2009 12:08 pm Post subject: Not creating parent fields if child element is not present |
|
|
Apprentice
Joined: 14 Oct 2007 Posts: 44 Location: Texas, USA
|
Hi,
There is input xml msg structure something like this, parent.child.grandchild. Now input tree is parsing it and if grandchild is not present i.e value os NULL, parent.child tag is not created.
In compute node, I am writing
Set OutputRoot.XMLNSC.parent.child.grandchild = InputRoot.XMLNSC.parent.child.grandchild;
The output tree structure is creating empty child tag. Now I can prevent it by implementing NULL check or EXISTS fn for parent.child. But I do not want this way as in current scenario, I am having around 500 fields and each fields are optional.
Do we have any other method by which we can prevent it without implementing a null check on every child? |
|
Back to top |
|
 |
Gaya3 |
Posted: Sun Dec 20, 2009 10:02 pm Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
This is MB related :
Admins : Please move to MB Section
coming back to the issue:
Create a generic function which checks the field is null or not.
if null dont create else create the output. _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
smdavies99 |
Posted: Sun Dec 20, 2009 11:39 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
isn't this very much the same question as:-
http://www.mqseries.net/phpBB2/viewtopic.php?t=51951
Which you asked earlier? _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
amiivas |
Posted: Mon Dec 21, 2009 5:30 pm Post subject: |
|
|
Apprentice
Joined: 14 Oct 2007 Posts: 44 Location: Texas, USA
|
Yes this was the first post which originated from the main issue described in my later post. Later I realized that first this was posted in the wrong forum and again the later one is moving closer to this issue. So now it's a good idea to close this thread.
Thank you for bringing this in my notice. and thanks all for the replies for both of my thread. _________________ IBM WebSphere Certified Solution Developer |
|
Back to top |
|
 |
amiivas |
Posted: Mon Dec 21, 2009 5:35 pm Post subject: Closed |
|
|
Apprentice
Joined: 14 Oct 2007 Posts: 44 Location: Texas, USA
|
|
Back to top |
|
 |
|