|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
XMLNSC Parser for ComplexType value |
« View previous topic :: View next topic » |
Author |
Message
|
kash3338 |
Posted: Mon Sep 01, 2014 9:39 pm Post subject: XMLNSC Parser for ComplexType value |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
Hi,
I guess this query would have already been discussed in this forum, but I could not find out a post related to this query (May be I did not get the correct key words to search).
I have a XML as below,
Code: |
<Root>
A
<B>abc</B>
</Root>
|
This is a "Valid" XML. How do I parse to get the Value "A" in my ESQL using XMLNSC parser?
When I try to parse this XML using the below ESQL statement, I do not get the value "A",
Code: |
DECLARE varInputChar CHARACTER;
SET varInputChar = FIELDVALUE(InputRoot.XMLNSC.Root);
|
But when I use XML or XMLNS parsers, I am able to get the value "A" in my Character vaiable "varInputChar".
Why do I see this behaviour in XMLNSC? |
|
Back to top |
|
 |
smdavies99 |
Posted: Mon Sep 01, 2014 10:13 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
What result do you get?
What version (inc fixpack) of broker are you using? _________________ 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 |
|
 |
kash3338 |
Posted: Mon Sep 01, 2014 10:21 pm Post subject: |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
smdavies99 wrote: |
What result do you get? |
The result I get is a empty tag,
smdavies99 wrote: |
What version (inc fixpack) of broker are you using? |
7.0.0.1 |
|
Back to top |
|
 |
kimbert |
Posted: Tue Sep 02, 2014 3:02 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
The 'A' is 'mixed content'.
http://www.w3.org/TR/2006/REC-xml-20060816/#sec-mixed-content
Do you have a schema ( xsd ) for this XML document? If so, I would be interested to see it. Mixed content is not usually used for carrying data.
The default behaviour of the XMLNSC parser is to discard all mixed content - this is why you are not seeing the 'A' in the message tree. You can modify the input node properties so that mixed content not discarded. _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
kash3338 |
Posted: Tue Sep 02, 2014 3:21 am Post subject: |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
kimbert wrote: |
The default behaviour of the XMLNSC parser is to discard all mixed content - this is why you are not seeing the 'A' in the message tree. You can modify the input node properties so that mixed content not discarded. |
Thanks a lot Kimbert!!! That was spot-on!! There is no schema for this XML, it was just a one of kind we came across and saw this behavior in XMLNSC. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|