|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
Cardinality and XML |
« View previous topic :: View next topic » |
Author |
Message
|
sealpup |
Posted: Thu Nov 04, 2010 6:39 am Post subject: |
|
|
 Apprentice
Joined: 21 Sep 2010 Posts: 26
|
Well Vitor,
Quote: |
So you're saying you've discovered that WMB doesn't recognise XML structure unless you associate it with an XML parser? |
If you would take the time to read the posts. That is all of them, in order, following one to the next, while remembering the content of the previous one, then you wouldn't have to ask the question.
It has nothing to do with the parser.
For your benefit,
Code: |
SET Opps = CARDINALITY(Environment.Variables.XMLNSC.InputXML.Opportunity[]);
SET Opps = CARDINALITY(Environment.Variables.anything.InputXML.Opportunity[]); |
both work.
If I may make a suggestion for you.
Have a look at the manner of mgk's posts all over these forums.
Polite, considerate, not condescending, helpful, patient, relaxed, without sarcasm.
Compare with your own.
Regards,
Kevin. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Nov 04, 2010 6:46 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sealpup wrote: |
Compare with your own. |
So your point is that mgk (along with many other posters) is a nicer person than me.
This is not news. Have pity for those who have to work for me. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mgk |
Posted: Thu Nov 04, 2010 6:56 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Hi,
So you say that this code:
Code: |
SET Opps = CARDINALITY(Environment.Variables.anything.InputXML.Opportunity[]); |
returns a value. I'm very suprised, as I would expect it to return NULL. When you have time, posting a user trace and the output from a trace node should help get to the bottom of it...
Kind Regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Nov 04, 2010 7:01 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mgk wrote: |
I'm very suprised, as I would expect it to return NULL. |
I'm relieved, as I was thinking that but didn't want to say anything under the circumstances. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sealpup |
Posted: Thu Nov 04, 2010 7:03 am Post subject: |
|
|
 Apprentice
Joined: 21 Sep 2010 Posts: 26
|
Perhaps this needs clarification.
Code: |
SET Environment.Variables.XMLNSC.InputXML = InputRoot.XMLNSC.AWDSalesforceMessage; |
followed by
Code: |
SET Opps = CARDINALITY(Environment.Variables.XMLNSC.InputXML.Opportunity[]); |
works.
Code: |
SET Environment.Variables.anything.InputXML = InputRoot.XMLNSC.AWDSalesforceMessage; |
followed by
Code: |
SET Opps = CARDINALITY(Environment.Variables.anything.InputXML.Opportunity[]); |
works.
Code: |
SET Environment.Variables.anything.InputXML = InputRoot.XMLNSC.AWDSalesforceMessage; |
followed by
Code: |
SET Opps = CARDINALITY(Environment.Variables.somethingelse.InputXML.Opportunity[]); |
I have not tried, but I imagine it will return NULL as you suggest.
You will know better than me no doubt at all.
Regards,
Kevin. |
|
Back to top |
|
 |
mgk |
Posted: Thu Nov 04, 2010 9:19 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Thanks, it was not clear that your two paths matched! Then your results match my expectation (and the code )
Kind Regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|