ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » XMLNS parsing

Post new topic  Reply to topic
 XMLNS parsing « View previous topic :: View next topic » 
Author Message
mattfarney
PostPosted: Sat Jan 12, 2008 3:50 pm    Post subject: XMLNS parsing Reply with quote

Disciple

Joined: 17 Jan 2006
Posts: 167
Location: Ohio

While the discussion at this link is quite informative
http://www.mqseries.net/phpBB2/viewtopic.php?p=21719&sid=821967aebdb4b9ab9dc446f4397e501d
I have a question.

What determines exactly when and where stray non-white space characters affect the parsing? I have the same code and environment (as best as I can tell).

The beginning of the properly formed xml looks like this:
<?xml etc>/13/10<SyncData>/13/10<Field>

(/13 is Ascii value 13)

In one of my environments, I can accurately find the name of the BOD to be SyncData. In another (as far as I can tell), the same code fails, because it thinks the BOD name to be an empty field.

I believe the code is using fieldname(InputRoot.XMLNS.[<]) though I would have to double check.

Anyone have any insights into what OS settings or MQ settings could be causing this different behavior?


-mf
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Jan 12, 2008 4:50 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

hex 0D0A is an ASCII carriage return + line feed.

So deal with it...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mattfarney
PostPosted: Sat Jan 12, 2008 5:30 pm    Post subject: Reply with quote

Disciple

Joined: 17 Jan 2006
Posts: 167
Location: Ohio

I can deal with it, but my problem is that the behavior appears to be system dependent. That makes it difficult to guarantee that any code fix will work the same in each environment.

Hence, my question.

-mf
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Jan 13, 2008 2:19 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Remember XML does not need the new line and carriage return.
It is made/meant to be machine readable. So remove any text between the tags...
See XMLNSC to help with that...

CRLF are specific to a CCSID environment. You could deal with them on that basis...

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Mon Jan 14, 2008 2:01 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
What determines exactly when and where stray non-white space characters affect the parsing?
The XMLNS parser puts all whitespace characters into the message tree. It might be better to ask 'where can whitespace appear in a well-formed XML document'.

I expect you understand what is going on now. The root tag ( SyncData ) has CRLF either side of it. The XMLNS parser will normalise the CRLF to LF and put it into the message tree ( linefeed normalisation is required by the XML specification )

As fjb_saper says, if you are not interested in the whitespace then XMLNSC would be a good choice ( and it is now the preferred XML parser )
Back to top
View user's profile Send private message
mattfarney
PostPosted: Mon Jan 14, 2008 9:36 am    Post subject: Reply with quote

Disciple

Joined: 17 Jan 2006
Posts: 167
Location: Ohio

I was headed down that path but XMLNSC is a V6 only animal, right?

I am following that the various control characters are being stored in the tree and preventing field/string matching. What is still confusing me is how the same code in what appears to be the same environment is generating two separate parsing images. (i.e. this code works in most environments and not in one.)

The only thing I can think off of hand would be to check and see if
InputRoot.Properties.CodedCharSetId
is different between environments.

-mf
Back to top
View user's profile Send private message
EddieA
PostPosted: Mon Jan 14, 2008 10:45 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

You haven't mentioned what the environments actually are.

Your sequence is a "line end" from a Windows system. Which is different from a "line end" on a UN*X system. And then there's z/OS as well. This could affect how the parsers are reacting. Maybe.

You could qualify each XML entity, in the ESQL, to ensure you "skip" the white space.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
mattfarney
PostPosted: Mon Jan 14, 2008 11:33 am    Post subject: Reply with quote

Disciple

Joined: 17 Jan 2006
Posts: 167
Location: Ohio

Both environments are Windows 2000 running WBIMB v5.0 on MQ6.0.

-mf
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Jan 14, 2008 12:06 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
In one of my environments, I can accurately find the name of the BOD to be SyncData. In another (as far as I can tell), the same code fails, because it thinks the BOD name to be an empty field.
- Insert a Trace node immediately after the input node.
- Trace ${Root} in both environments.
- Compare the trace outputs.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » XMLNS parsing
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.