| Author | 
		  Message
		 | 
		
		  | SKK | 
		  
		    
			  
				 Posted: Tue Dec 13, 2005 8:32 am    Post subject: Special character | 
				     | 
			   
			 
		   | 
		
		
		    Acolyte
 
 Joined: 09 May 2005 Posts: 67
  
  | 
		  
		    
			  
				Hi.
 
 
       I'm trying to populate MQRFH2 NameValueData with special character "&".
 
 
For Ex:
 
set OutputRoot.XML.Result[I].ID='Test&Test';
 
set OutputRoot.MQRFH2.NameValueData[] = OutputRoot.XML.Result[];  
 
 
I get NameValueData populated as <ID>Test&Test</ID>.
 
 
Can anyone let me know, how to avoid amp; in the above.
 
 
 
Regards
 
SKK _________________ Regards,
 
SKK | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | JT | 
		  
		    
			  
				 Posted: Tue Dec 13, 2005 8:52 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Padawan
 
 Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT. 
  | 
		  
		    
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Tue Dec 13, 2005 8:58 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				
   
	| JT wrote: | 
   
  
	| Do a search for 'CDATA' | 
   
 
 
 
I didn't think that the RFH2 was properly XML... _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | SKK | 
		  
		    
			  
				 Posted: Tue Dec 13, 2005 10:50 am    Post subject: Special Character | 
				     | 
			   
			 
		   | 
		
		
		    Acolyte
 
 Joined: 09 May 2005 Posts: 67
  
  | 
		  
		    
			  
				Hi,
 
 
 I tried using,
 
 
set OutputRoot.XML.Result[I].ID.(XML.CDataSection)='Test&Test';
 
set OutputRoot.MQRFH2.NameValueData[] = OutputRoot.XML.Result[]; 
 
 
still I get
 
 
 NameValueData populated as <ID>Test&Test</ID>. 
 
 
 
Regards
 
suresh. _________________ Regards,
 
SKK | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Tue Dec 13, 2005 10:54 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				Where are you actually seeing the & ?  In a trace in the flow, or outside the flow? _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | SKK | 
		  
		    
			  
				 Posted: Tue Dec 13, 2005 11:34 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Acolyte
 
 Joined: 09 May 2005 Posts: 67
  
  | 
		  
		    
			  
				Hi
 
 
 I see it outside the message flow, i'm using RFHUtil to view the message.
 
 
Regards
 
SKK _________________ Regards,
 
SKK | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | SKK | 
		  
		    
			  
				 Posted: Tue Dec 13, 2005 1:52 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Acolyte
 
 Joined: 09 May 2005 Posts: 67
  
  | 
		  
		    
			  
				Hi,
 
 
 Here is the trace, in this field is getting populated properly.
 
 
 
(
 
  (0x1000000)Properties = (
 
    (0x3000000)MessageSet      = ''
 
    (0x3000000)MessageType     = ''
 
    (0x3000000)MessageFormat   = ''
 
    (0x3000000)Encoding        = 273
 
    (0x3000000)CodedCharSetId  = 819
 
    (0x3000000)Transactional   = TRUE
 
    (0x3000000)Persistence     = FALSE
 
    (0x3000000)CreationTime    = GMTTIMESTAMP '2005-12-13 19:28:09.820'
 
    (0x3000000)ExpirationTime  = -1
 
    (0x3000000)Priority        = 0
 
    (0x3000000)ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
 
    (0x3000000)ReplyProtocol   = 'MQ'
 
    (0x3000000)Topic           = NULL
 
  )
 
  (0x1000000)MQMD       = (
 
    (0x3000000)SourceQueue      = 'XML.Inbound.Q'
 
    (0x3000000)Transactional    = TRUE
 
    (0x3000000)Encoding         = 273
 
    (0x3000000)CodedCharSetId   = 819
 
    (0x3000000)Format           = 'MQHRF2'
 
    (0x3000000)Version          = 2
 
    (0x3000000)Report           = 0
 
    (0x3000000)MsgType          = 8
 
    (0x3000000)Expiry           = -1
 
    (0x3000000)Feedback         = 0
 
    (0x3000000)Priority         = 0
 
    (0x3000000)Persistence      = 0
 
    (0x3000000)MsgId            = X'414d5120514d554e4254523030322020439bbb6820016a04'
 
    (0x3000000)CorrelId         = X'000000000000000000000000000000000000000000000000'
 
    (0x3000000)BackoutCount     = 0
 
    (0x3000000)ReplyToQ         = '                                                '
 
    (0x3000000)ReplyToQMgr      = 'QMUNBTR002                                      '
 
    (0x3000000)UserIdentifier   = 'mqm         '
 
    (0x3000000)AccountingToken  = X'0332313000000000000000000000000000000000000000000000000000000006'
 
    (0x3000000)ApplIdentityData = '                                '
 
    (0x3000000)PutApplType      = 28
 
    (0x3000000)PutApplName      = '                            '
 
    (0x3000000)PutDate          = DATE '2005-12-13'
 
    (0x3000000)PutTime          = GMTTIME '19:28:09.820'
 
    (0x3000000)ApplOriginData   = '    '
 
    (0x3000000)GroupId          = X'000000000000000000000000000000000000000000000000'
 
    (0x3000000)MsgSeqNumber     = 1
 
    (0x3000000)Offset           = 0
 
    (0x3000000)MsgFlags         = 0
 
    (0x3000000)OriginalLength   = -1
 
  )
 
  (0x1000000)MQRFH2     = (
 
    (0x3000000)Version       = 2
 
    (0x3000000)Format        = 'MQSTR '
 
    (0x1000000)NameValueData = (
 
      (0x1000000)SENDER_ID        = (
 
        (0x2000000) = 'TEST&TEST'
 
      )
 
      (0x1000000)RECEIVER_ID      = (
 
        (0x2000000) = 'TEST'
 
      )
 
      (0x1000000)QUEUE_NAME       = (
 
        (0x2000000) = 'TEST'
 
      )
 
      (0x1000000)QUEUE_MANAGER    = (
 
        (0x2000000) = 'QMUNBTR002'
 
      )
 
      (0x1000000)TYPE             = (
 
        (0x2000000) = 'NULL'
 
      )
 
      (0x1000000)DESTINATION_TYPE = (
 
        (0x2000000) = 'NULL'
 
      )
 
      (0x1000000)REGION           = (
 
        (0x2000000) = 'NULL'
 
      )
 
    )
 
    (0x1000000)usr           = (
 
      (0x1000000)SenderId     = (
 
        (0x2000000) = 'TEST&TEST'
 
      )
 
      (0x1000000)SenderQual   = (
 
        (0x2000000) = '08'
 
      )
 
      (0x1000000)ReceiverId   = (
 
        (0x2000000) = 'TEST'
 
      )
 
      (0x1000000)ReceiverQual = (
 
        (0x2000000) = '08'
 
      )
 
    )
 
    (0x1000000)mcd           = (
 
      (0x1000000)Msd = (
 
        (0x2000000) = 'none'
 
      )
 
    )
 
  )
 
  (0x1000000)BLOB       = (
 
    (0x3000000)BLOB = X'4953412a30302a202020202020202020202a30302a202020202020202020202a30382a5445535426544553542020202020202
 
a30382a5445535420202020202020202020202a3035303332312a313330342a552a30303430312a3030303030353731362a302a502a3c7e47532a46412a39
 
3236373237363030302a393235323231313130302a32303035303332312a313330342a333738322a542a3030343031305543537e53542a3939372a3030303
 
030333835307e414b312a47502a313830307e414b322a3838302a31383030303030317e414b352a417e414b392a412a312a312a317e53452a362a30303030
 
30333835307e47452a312a333738327e4945412a312a3030303030353731367e'
 
  )
 
)
 
 
 
Regards
 
SKK. _________________ Regards,
 
SKK | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Tue Dec 13, 2005 8:59 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 Location: LI,NY 
  | 
		  
		    
			  
				& is the normal xml notation for the & character in xml format.
 
So do not worry about it. If you retrieve the information you should see 
 
Test & Test and be fine.
 
 
Enjoy    | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | EddieA | 
		  
		    
			  
				 Posted: Tue Dec 13, 2005 10:52 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi
 
 Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles 
  | 
		  
		    
			  
				
   
	| Quote: | 
   
  
	| & is the normal xml notation for the & character in xml format.  | 
   
 
 
Yes, except that the Name/Value pairs in the RFH2 are not "true" XML.  It will depend on how you are reading them.
 
 
Cheers, _________________ Eddie Atherton
 
IBM Certified Solution Developer - WebSphere Message Broker V6.1
 
IBM Certified Solution Developer - WebSphere Message Broker V7.0 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Wed Dec 14, 2005 4:53 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				I wonder if using XML.AsIsElementContent would work here?
 
 
I'm sure that copying from XML to Environment and then to RFH2 will work, as it will strip off the parser association that is causing the transformation.
 
 
But that's slower. _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |