|  | 
 
  
    | RSS Feed - WebSphere MQ Support | RSS Feed - Message Broker Support |  
 
  
	|    |  |  
  
	| Extract Namespace Value from Input | « View previous topic :: View next topic » |  
  	| 
		
		
		  | Author | Message |  
		  | Gemz | 
			  
				|  Posted: Fri Feb 22, 2013 9:09 am    Post subject: Extract Namespace Value from Input |   |  |  
		  |  Centurion
 
 
 Joined: 14 Jan 2008Posts: 124
 
 
 | 
			  
				| Hi, I think we can get the Namespace value from an element in InputRoot.
 I tried to get with below esql, but it is not returning anything.
 
 
   
	| Code: |  
	| DECLARE ns1 NAMESPACE InputRoot.XMLNSC.*:Purchase; |  Actually if it is Character, it will return the value of Purchase.
 As the datatype is NAMESPACE, I guess it should return the value of Namespace.
 Am I doing anything wrong here...?
 
 -KarthicK
 _________________
 GemZ
 "An expert is one who knows more and more about less and less until he knows absolutely everything about nothing...."
 |  |  
		  | Back to top |  |  
		  |  |  
		  | Vitor | 
			  
				|  Posted: Fri Feb 22, 2013 9:34 am    Post subject: Re: Extract Namespace Value from Input |   |  |  
		  |  Grand High Poobah
 
 
 Joined: 11 Nov 2005Posts: 26093
 Location: Texas, USA
 
 | 
			  
				| 
   
	| Gemz wrote: |  
	| I think we can get the Namespace value from an element in InputRoot. |  
 You can.
 
 
 
   
	| Gemz wrote: |  
	| I tried to get with below esql, but it is not returning anything. 
 
   
	| Code: |  
	| DECLARE ns1 NAMESPACE InputRoot.XMLNSC.*:Purchase; |  |  
 How did you arrive at the conclusion you could obtain something from a DECLARE statement? What in the description of the NAMESPACE clause led you to believe this would work?
 
 
 
   
	| Gemz wrote: |  
	| As the datatype is NAMESPACE, I guess it should return the value of Namespace. |  
 Oh. You were just guessing.
 
 
 
   
	| Gemz wrote: |  
	| Am I doing anything wrong here...? |  
 Pretty much everything. Try using this.
 _________________
 Honesty is the best policy.
 Insanity is the best defence.
 |  |  
		  | Back to top |  |  
		  |  |  
		  | nukalas2010 | 
			  
				|  Posted: Sun Feb 24, 2013 12:15 am    Post subject: |   |  |  
		  |  Master
 
 
 Joined: 04 Oct 2010Posts: 220
 Location: Somewhere in the World....
 
 | 
			  
				| You can try like this... 
 
   
	| Code: |  
	| DECLARE cNs CHARACTER FIELDNAMESPACE(InputRoot.XMLNSC.(XML.Element)[1]); // depends on your request xml 
 DECLARE nSrvNmSpc NAMESPACE cNs;
 |  |  |  
		  | Back to top |  |  
		  |  |  
		  | Gemz | 
			  
				|  Posted: Mon Feb 25, 2013 2:23 am    Post subject: |   |  |  
		  |  Centurion
 
 
 Joined: 14 Jan 2008Posts: 124
 
 
 | 
			  
				| Hi Vitor/Nukalas2010, 
 FIELDNAMESPACE is the one I missed to look in InfoCenter
   Thanks
 
 
 
   
	| nukalas2010 wrote: |  
	| You can try like this... 
 
   
	| Code: |  
	| DECLARE cNs CHARACTER FIELDNAMESPACE(InputRoot.XMLNSC.(XML.Element)[1]); // depends on your request xml 
 DECLARE nSrvNmSpc NAMESPACE cNs;
 |  |  _________________
 GemZ
 "An expert is one who knows more and more about less and less until he knows absolutely everything about nothing...."
 |  |  
		  | Back to top |  |  
		  |  |  
		  |  |  |  
  
	|    |  | Page 1 of 1 |  
 
 
  
  	| 
		
		  | 
 
 | 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
 
 |  |  |  |