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 » there are blank elemens when parsing incoming message

Post new topic  Reply to topic
 there are blank elemens when parsing incoming message « View previous topic :: View next topic » 
Author Message
leo.yue
PostPosted: Fri Oct 22, 2004 7:46 pm    Post subject: there are blank elemens when parsing incoming message Reply with quote

Acolyte

Joined: 20 Oct 2004
Posts: 52

I used MQInput Node in my message flow, and it's domain is : XML

When I am debugging it I found that there are some blank elements in InputRoot.XML

XML example:
<?xml version="1.0" encoding="UTF-8"?>
<TestRoot>
<field> 1</field>
<field>1</field>
</TestRoot>

But I just eliminate the "Enter" characters and update the message as following, these blank elements disappear:
<?xml version="1.0" encoding="UTF-8"?><TestRoot><field> 1</field><field>1</field></TestRoot>

How can I do? Thanks!
Back to top
View user's profile Send private message
kirani
PostPosted: Fri Oct 22, 2004 10:16 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

You can read your input message as BLOB and then replace newline char in your input message with nothing. Similar topic has been discussed in this forum many times. Please search in this forum.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
leo.yue
PostPosted: Sat Oct 23, 2004 3:35 am    Post subject: Reply with quote

Acolyte

Joined: 20 Oct 2004
Posts: 52

Thank you very much!
I don't want to convert it from BLOB to XML for eliminating carriage return.
because I just worry about performance.

In fact, I am operating multiple element, I just want to overleap especial charcater when excuting "MOVE CurrentProcess NEXTSIBLING".

There is a xml data:
<Root>
<step id =1></step>
<step id =2></step>
</Root>

ESQL code:

DECLARE id CHARACTER;
SET id = 2;
DECLARE curStep REFERENCE TO InputRoot.XML.Root.step;

WHILE (LASTMOVE(curStep)) AND (FIELDVALUE(curstep.(XML.Attribute)id) <> id) DO
MOVE curStep NEXTSIBLING;
END WHILE;

BTW:
How can I direct set a referenct to step according to step's id?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Sat Oct 23, 2004 7:26 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You can add additional qualification clauses to MOVE, like Type...

>>-MOVE--------------------------------------------------------->

>--Target----+-TO--SourceFieldReference--------------+---------><
+-PARENT--------------------------------+
'-+-FIRSTCHILD------+--| NAME clauses |-'
+-LASTCHILD-------+
+-PREVIOUSSIBLING-+
'-NEXTSIBLING-----'

NAME clauses

|--+-+-------------------+--+---------------------------+--+-------------------+-+--|
| '-TYPE --Expression-' '-NAMESPACE--+-Expression-+-' '-NAME --Expression-' |
| '-*----------' |
+-IDENTITY --PathElement------------------------------------------------------+
| (1) |
'-REPEAT-------+-TYPE------+--------------------------------------------------'
+-NAME------+
'-TYPE-NAME-'
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
leo.yue
PostPosted: Sun Oct 24, 2004 6:00 am    Post subject: Reply with quote

Acolyte

Joined: 20 Oct 2004
Posts: 52

Thank you very much.
Now I can skip some blank element when I just use this statement:
"MOVE *** NEXTSIBLING REPEAT TYPE NAME"

But How I can direct reference to multiple element according to attribute value?
Back to top
View user's profile Send private message
shanson
PostPosted: Thu Nov 04, 2004 2:08 am    Post subject: Reply with quote

Partisan

Joined: 17 Oct 2003
Posts: 344
Location: IBM Hursley

The XML and XMLNS domains preserve an XML message pretty much as it appears 'on the wire', so you will get elements in the tree for white space such as <CR>. If you model your XML message using the MRM (using the XML physical format) the white space is removed automatically.
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 » there are blank elemens when parsing incoming message
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.