| Author | 
		  Message
		 | 
		
		  | schroederms | 
		  
		    
			  
				 Posted: Wed Sep 27, 2006 7:56 am    Post subject: Parsing question | 
				     | 
			   
			 
		   | 
		
		
		    Disciple
 
 Joined: 21 Jul 2003 Posts: 169 Location: IA 
  | 
		  
		    
			  
				I'm trying to pass values into a SQL statement passthru and I'm wanting to have the tags around the values included,  I've tried setting as a blob, etc, with no success.
 
 
An example would be like
 
<a>
 
    <b>
 
        <c>name</c>
 
        <d>addr</d>
 
        <e>city</e>
 
    </b>
 
</a>
 
 
What I want is to do something like this:
 
set Environment.DATA = InputBody.a.b;  
 
Then pass Environment.DATA as one of the SQL parameters, but DATA 
 
should look like this: '<c>name</c>....</e>'
 
 
Thanks in advance. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Wed Sep 27, 2006 7:59 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				The "tags" don't exist in the logical message tree.
 
 
They only exist in the physical message representation of that tree, when the  physical message should include tags (MRM-XML, XML, XMLNS, XMLNSC).
 
 
You can use ASBITSTREAM to turn a logical message tree into a physical message. _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | schroederms | 
		  
		    
			  
				 Posted: Wed Sep 27, 2006 8:00 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Disciple
 
 Joined: 21 Jul 2003 Posts: 169 Location: IA 
  | 
		  
		    
			  
				| I tried that already with no success. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Wed Sep 27, 2006 8:01 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				Tried it how? _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | schroederms | 
		  
		    
			  
				 Posted: Wed Sep 27, 2006 8:07 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Disciple
 
 Joined: 21 Jul 2003 Posts: 169 Location: IA 
  | 
		  
		    
			  
				I've been able to kinda do the same thing in another  flow to insert the complete tree with XML into a database by:
 
Declare data_blob BLOB;
 
Set OutputRoot.XML = NULL;
 
Set OutputRoot.XML = OutputLocalEnvironment.REQUEST;
 
Set data_blob =  BITSTREAM(OutputRoot.XML); 
 
 
And then insert the data_blob into a type of CLOB into an Oracle database.  However this issue is somewhat different.  I need to get these values then concatenate into a string an passthru. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Wed Sep 27, 2006 8:30 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				BITSTREAM is not the same as ASBITSTREAM.
 
 
BITSTREAM has been deprecated since early CSDs of 2.1.
 
 
Don't use it.  It doesn't do what you think it does. _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | schroederms | 
		  
		    
			  
				 Posted: Wed Sep 27, 2006 8:34 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Disciple
 
 Joined: 21 Jul 2003 Posts: 169 Location: IA 
  | 
		  
		    
			  
				| It was written under 2.1 and migrated to v6 two weeks ago, have not seen any issues yet but will look at changing it, thanks. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | kimbert | 
		  
		    
			  
				 Posted: Thu Sep 28, 2006 12:42 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 29 Jul 2003 Posts: 5543 Location: Southampton 
  | 
		  
		    
			  
				
   
	| Quote: | 
   
  
	| have not seen any issues yet | 
   
 
But you might sometime in the future. I'm with Jeff here - fix it while you have the chance. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |