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 » Having & show as & in an XML Tag

Post new topic  Reply to topic
 Having & show as & in an XML Tag « View previous topic :: View next topic » 
Author Message
LH33
PostPosted: Wed Jun 04, 2003 9:13 am    Post subject: Having & show as & in an XML Tag Reply with quote

Master

Joined: 21 Nov 2002
Posts: 200

I have to concatenate several tags, then put an &, then several more tags to create one output tag. I know that the & is a special character for XML and have tried escaping and several other things and my output always looks like the following:

<ODL_PRIMARY_STREET>SSGOTHARDRDN1FL&amp;MARGATERD</ODL_PRIMARY_STREET>

I want it to look like this:
<ODL_PRIMARY_STREET>SSGOTHARDRDN1FL&MARGATERD</ODL_PRIMARY_STREET>

Can someone help me understand what I need to do? Here is the code I currently have: Thanks in advance!!!


Set PriSt1 = (InputRoot.XML.CompleteOdlJob.DataArea.ODL_LIGHT_INFORMATION.ODL_ALPHA_CIVIC ||
InputRoot.XML.CompleteOdlJob.DataArea.ODL_LIGHT_INFORMATION.ODL_P_ARTICLE1 ||
InputRoot.XML.CompleteOdlJob.DataArea.ODL_LIGHT_INFORMATION.ODL_STREET_NAME1 ||
InputRoot.XML.CompleteOdlJob.DataArea.ODL_LIGHT_INFORMATION.ODL_P_STREET_TYPE1 ||
InputRoot.XML.CompleteOdlJob.DataArea.ODL_LIGHT_INFORMATION.ODL_P_DIR1 ||
InputRoot.XML.CompleteOdlJob.DataArea.ODL_LIGHT_INFORMATION.ODL_APPT_NO ||
InputRoot.XML.CompleteOdlJob.DataArea.ODL_LIGHT_INFORMATION.ODL_COMMERCIAL_LOCAL);
If ((InputRoot.XML.CompleteOdlJob.DataArea.ODL_LIGHT_INFORMATION.ODL_P_ARTICLE2 <> '' or
InputRoot.XML.CompleteOdlJob.DataArea.ODL_LIGHT_INFORMATION.ODL_P_ARTICLE2 IS NOT NULL) or
(InputRoot.XML.CompleteOdlJob.DataArea.ODL_LIGHT_INFORMATION.ODL_STREET_NAME2 <> '' or
InputRoot.XML.CompleteOdlJob.DataArea.ODL_LIGHT_INFORMATION.ODL_STREET_NAME2 IS NOT NULL) or
(InputRoot.XML.CompleteOdlJob.DataArea.ODL_LIGHT_INFORMATION.ODL_P_STREET_TYPE2 <> '' or
InputRoot.XML.CompleteOdlJob.DataArea.ODL_LIGHT_INFORMATION.ODL_P_STREET_TYPE2 IS NOT NULL) or
(InputRoot.XML.CompleteOdlJob.DataArea.ODL_LIGHT_INFORMATION.ODL_P_DIR2 <> '' or
InputRoot.XML.CompleteOdlJob.DataArea.ODL_LIGHT_INFORMATION.ODL_P_DIR2 IS NOT NULL))
THEN
SET PriSt2 = ('&' || InputRoot.XML.CompleteOdlJob.DataArea.ODL_LIGHT_INFORMATION.ODL_P_ARTICLE2 ||
InputRoot.XML.CompleteOdlJob.DataArea.ODL_LIGHT_INFORMATION.ODL_STREET_NAME2 ||
InputRoot.XML.CompleteOdlJob.DataArea.ODL_LIGHT_INFORMATION.ODL_P_STREET_TYPE2 ||
InputRoot.XML.CompleteOdlJob.DataArea.ODL_LIGHT_INFORMATION.ODL_P_DIR2);
SET OutputRoot.XML.CompleteOdlJob.DataArea.ODL_LIGHT_INFORMATION.ODL_PRIMARY_STREET = (PriSt1 || PriSt2);
ELSE
SET OutputRoot.XML.CompleteOdlJob.DataArea.ODL_LIGHT_INFORMATION.ODL_PRIMARY_STREET = PriSt1;
END IF;
Back to top
View user's profile Send private message
MVO
PostPosted: Wed Jun 04, 2003 10:51 am    Post subject: Reply with quote

Centurion

Joined: 09 Sep 2001
Posts: 131

You should use CDATA section as follows:

<ODL_PRIMARY_STREET><![CDATA[SSGOTHARDRDN1FL&MARGATERD]]></ODL_PRIMARY_STREET>
Back to top
View user's profile Send private message
LH33
PostPosted: Thu Jun 05, 2003 5:17 am    Post subject: Reply with quote

Master

Joined: 21 Nov 2002
Posts: 200

Thanks!! I have searched this site and the Using the Control Center documentation as well as the on-line help and cannot find anything that shows me how I would code the CDATA section in my example above. Can anyone help me with how to code it or point me to some documentation?
Back to top
View user's profile Send private message
MVO
PostPosted: Thu Jun 05, 2003 5:36 am    Post subject: Reply with quote

Centurion

Joined: 09 Sep 2001
Posts: 131

Example:
set OutputRoot.XML."ODL_PRIMARY_STREET".(XML.CDataSection)='SSGOTHARDRDN1FL&MARGATERD'

There are many useful examples in "MQSI V2.0 Using the Control Center". However, I don't think those examples are kept in 2.1 manuals.

Good luck
Back to top
View user's profile Send private message
LH33
PostPosted: Thu Jun 05, 2003 5:39 am    Post subject: Reply with quote

Master

Joined: 21 Nov 2002
Posts: 200

Thanks!! Since the data in the tag is concatenated from several fields, do I put the CDATA section in each field I concatenate? Sorry for my confusion!
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 » Having & show as & in an XML Tag
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.