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 » XML attribute question

Post new topic  Reply to topic
 XML attribute question « View previous topic :: View next topic » 
Author Message
miron
PostPosted: Wed Oct 09, 2002 3:17 am    Post subject: XML attribute question Reply with quote

Apprentice

Joined: 27 Jun 2002
Posts: 39
Location: New York

Hello,

I am trying to create an xml attribute in output msg from xml tag in the input msg. Something strange happens that I can not figure out. What do I do wrong here?

Here is the code:

while lastmove(TERM_REF_CURR) do
set TS = TS + 1;
set OutputRoot.XML.outxmlpath.LINE_ITEM[TS] = '';
set MYTEMP1 = InputRoot.XML.outxmlpath.ET_ITEM_CURR.item[TS].ZZITEM_CATEGORY;
set OutputRoot.XML.outxmlpath.LINE_ITEM[TS].(XML.Attribute)CATEGORY = InputRoot.XML.inxmlpath.ET_ITEM_CURR.item[TS].ZZITEM_CATEGORY;
set the rest of my xml
move TERM_REF_CURR nextsibling Repeat Name;
end while;

When I remove line that assigns ZZITEM_CATEGORY to MYTEMP1 then I do not get xml.attribute created in output msg. When i use MYTEMP1 then attribute is created properly. Interesting is that I do not use MYTEMP1 anywhere. I also tried that without first line that creates LINE_ITEM (LINE_ITEM[TS]='') .
I use WMQI 2.1 with CSD02.

Thank you for your input.
Miron
Back to top
View user's profile Send private message
jdouch
PostPosted: Wed Oct 09, 2002 3:44 am    Post subject: Reply with quote

Apprentice

Joined: 31 May 2002
Posts: 32
Location: London, UK

hi,

not too sure about the mytemp thing, but if your trying to go from tag xml to attribute xml eg:

<tagxml><field1>1234</field1></tagxml>

<attxml field1 = "1234"/>

then i think you need to CAST the input tag xml field as CHAR so you'll esql will look something like this ...

SET OutputRoot.XML.outxmlpath.LINE_ITEM[TS].(XML.Attr)CATEGORY = CAST(InputRoot.XML.inxmlpath.ET_ITEM_CURR.item[TS].ZZITEM_CATEGORY AS CHAR);

hope this helps

Julian
_________________
Julian Douch
E-business Solutions Consultant

WMQ/WMQI Specialist
Back to top
View user's profile Send private message Send e-mail
miron
PostPosted: Wed Oct 09, 2002 4:03 am    Post subject: Reply with quote

Apprentice

Joined: 27 Jun 2002
Posts: 39
Location: New York

Hi Julian,

Thank you for reply. Your recommendation was correct. I guess MYTEMP1(char) worked as CAST function in my case.

Thank you.
Miron
Back to top
View user's profile Send private message
jdouch
PostPosted: Wed Oct 09, 2002 4:11 am    Post subject: Reply with quote

Apprentice

Joined: 31 May 2002
Posts: 32
Location: London, UK

ok not a problem,

i guess your theory about the MYTEMP variable would be correct too

rgds
_________________
Julian Douch
E-business Solutions Consultant

WMQ/WMQI Specialist
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » XML attribute question
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.