| Author | 
		  Message
		 | 
		
		  | Meow | 
		  
		    
			  
				 Posted: Mon Dec 08, 2003 2:16 pm    Post subject: xml transformation | 
				     | 
			   
			 
		   | 
		
		
		    Voyager
 
 Joined: 25 Jun 2003 Posts: 95
  
  | 
		  
		    
			  
				Hi all,
 
 
this is my input message
 
 
<query><cond>123</cond></query>
 
or
 
<req><cond>456</cond></req>
 
 
depending on the input message i get my response varies
 
 
<responsequery>
 
<table col1="aaa"/>
 
<table col1="bbb"/>
 
</responsequery>
 
 
or
 
 
<responsereq>
 
<name col1="aaa"/>
 
<name col1="bbb"/>
 
</responsereq>
 
 
can some one let me know how to dynamically generate the tags in XML. I am retrieving the same set of values but my output message is varying depending on the input message i get. 
 
 
please let me know.
 
 
thanks | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | maxis | 
		  
		    
			  
				 Posted: Tue Dec 09, 2003 1:40 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Centurion
 
 Joined: 25 Jun 2002 Posts: 144
  
  | 
		  
		    
			  
				What youre asking is its 
 question or real requirement ? Because .. if its a real requirement .. who will the receiving system determine what to look for ? .... 
 
  keeping my curiousity beside .... 
 
 
no its not possible to generate dynamic xml tags not even xml attributes ...
 
 
 
M | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | EddieA | 
		  
		    
			  
				 Posted: Tue Dec 09, 2003 2:07 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi
 
 Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles 
  | 
		  
		    
			  
				
   
	| Quote: | 
   
  
	no its not possible to generate dynamic xml tags not even xml attributes ... 
 
 | 
   
 
 
 
Wrong.  You can generate the XML using either EVAL or {...}, which will allow run-time substitition.
 
 
Cheers, _________________ Eddie Atherton
 
IBM Certified Solution Developer - WebSphere Message Broker V6.1
 
IBM Certified Solution Developer - WebSphere Message Broker V7.0 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | maxis | 
		  
		    
			  
				 Posted: Tue Dec 09, 2003 7:28 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Centurion
 
 Joined: 25 Jun 2002 Posts: 144
  
  | 
		  
		    
			  
				great ... & thanks for correcting
 
 
would you please post the exact syntax ...    | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | kirani | 
		  
		    
			  
				 Posted: Tue Dec 09, 2003 11:30 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Jedi Knight
 
 Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA 
  | 
		  
		    
			  
				Here is an example,
 
 
   
	| Code: | 
   
  
	
 
DECLARE TAGNAME CHAR 'MyXMLTag';
 
SET OutputRoot.XML.{TAGNAME} = 'ABC';
 
 | 
   
 
 
 
will generate following output,
 
 
   
	| Quote: | 
   
  
	
 
<MyXMLTag>ABC</MyXMLTag>
 
 | 
   
 
 _________________ 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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |