| Author | 
		  Message
		 | 
		
		  | John_peter | 
		  
		    
			  
				 Posted: Mon May 10, 2004 9:51 am    Post subject: Processing Instruction in XML using ESQL | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 10 May 2004 Posts: 22
  
  | 
		  
		    
			  
				I want to add a prosessing instruction
 
SET OutputRoot.XML.(XML.ProcessingInstruction) = 'ibd version="1.4"'
 
 
But I get a space after the '?' in the output
 
 
 
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 
<? ibd version="1.4"?> | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | bower5932 | 
		  
		    
			  
				 Posted: Mon May 10, 2004 10:09 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Knight
 
 Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA 
  | 
		  
		    
			  
				| Try posting in WMQI Support index.  You'll get a better chance of getting an answer. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | KimT | 
		  
		    
			  
				 Posted: Tue May 11, 2004 9:30 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 07 May 2004 Posts: 17 Location: Hartford, CT 
  | 
		  
		    
			  
				I just found out you cannot have a PI outside your outer tags.  You can set Environment.Variables.String1 and Environment.Variables.String2 then RCD to blob, next concatenate, RCD to xml again.
 
 
Under the concatenate compute node:
 
 
SET OutputRoot."BLOB"."BLOB" = CAST ((Environment.Variables.STRING1 || Environment.Variables.STRING2 || CAST (InputBody."BLOB" AS CHAR CCSID InputRoot.Properties.CodedCharSetId)) AS BLOB CCSID InputRoot.Properties.CodedCharSetId);
 
 
 
That's how I got it to work.  Good Luck! | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | KimT | 
		  
		    
			  
				 Posted: Wed May 12, 2004 4:27 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 07 May 2004 Posts: 17 Location: Hartford, CT 
  | 
		  
		    
			  
				SET OutputRoot.XML.OT.(XML.ProcessingInstruction)ibd = 'version="1.4"';
 
 
where OT is your outer tag name
 
 
this is the correct format to use for a PI, sorry forgot to put it in the first reply   | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | John_peter | 
		  
		    
			  
				 Posted: Sat May 15, 2004 5:26 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 10 May 2004 Posts: 22
  
  | 
		  
		    
			  
				
   
	| KimT wrote: | 
   
  
	SET OutputRoot.XML.OT.(XML.ProcessingInstruction)ibd = 'version="1.4"';
 
 
where OT is your outer tag name
 
 
this is the correct format to use for a PI, sorry forgot to put it in the first reply   | 
   
 
 
 
Perfect !! That Worked!Thanks! | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |