| Author | 
		  Message
		 | 
		
		  | sanketpatel | 
		  
		    
			  
				 Posted: Tue Nov 21, 2006 4:57 am    Post subject: remove namespace from xml message | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 31 Oct 2006 Posts: 40
  
  | 
		  
		    
			  
				Hi,
 
 
my input message is like this:
 
 
 
<DataElement>
 
	<NS1:sap_zv_prodn_bal_mvmnt_data 
 
	xmlns:NS1="http://www.ibm.com/websphere/crossworlds/2002/BOSchema/sap_zv_prodn_bal_mvmnt_data" 
 
	xmlns:NS2="http://www.ibm.com/websphere/crossworlds/2002/BOSchema/sap_prdbalmvmntdata" 
 
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 
		<Plant>1121</Plant>
 
		<MatDesc>MOTOR SPIRIT 87 ON (Unleaded MS)</MatDesc>
 
		<MatCode>16000</MatCode>
 
	</NS1:sap_zv_prodn_bal_mvmnt_data>
 
</DataElement>
 
 
and i want output like this:
 
 
<DataElement>
 
	<Plant>1121</Plant>
 
	<MatDesc>MOTOR SPIRIT 87 ON (Unleaded MS)</MatDesc>
 
	<MatCode>16000</MatCode>
 
</DataElement>	
 
 
i tried this...
 
 
	DECLARE NS1 NAMESPACE 'http://www.ibm.com/websphere/crossworlds/2002/BOSchema/sap_zv_prodn_bal_mvmnt_data';
 
		CALL CopyMessageHeaders();
 
		CALL CopyEntireMessage();
 
		set OutputRoot.XML.DataElement = InputRoot.XML.NS1:sap_zv_prodn_bal_mvmnt_data;
 
 
but i am getting and xml writing error. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | nathanw | 
		  
		    
			  
				 Posted: Tue Nov 21, 2006 5:04 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Knight
 
 Joined: 14 Jul 2004 Posts: 550
  
  | 
		  
		    
			  
				You are using the XMLNS domain I assume.
 
 
If you carry out changes to teh message and do not inlcude a declaration then it will fail as no namespace declaration is read.
 
 
After the Input node insert a Reset Content Descriptor node and switch it to XML then rebuild your message in esql etc. _________________ Who is General Failure and why is he reading my hard drive?
 
 
Artificial Intelligence stands no chance against Natural Stupidity.
 
 
Only the User Trace Speaks The Truth   | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | sanketpatel | 
		  
		    
			  
				 Posted: Tue Nov 21, 2006 5:32 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 31 Oct 2006 Posts: 40
  
  | 
		  
		    
			  
				sorry i am not getting u..
 
 
pls come again... | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Tue Nov 21, 2006 5:41 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				You can't do namespaces when you use XML domain, you must use XMLNS or XMLNSC.
 
 
If you do a search here, you can find a couple of different pieces of code for removing namespaces from a tree.   At least one of those pieces of code is not very good, so use some caution. _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | sanketpatel | 
		  
		    
			  
				 Posted: Tue Nov 21, 2006 5:53 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 31 Oct 2006 Posts: 40
  
  | 
		  
		    
			  
				hey..
 
 
i am very much new with the esql.
 
 
if anyone can write small example it will be a great help.
 
 
thanks | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Tue Nov 21, 2006 6:20 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				If you do a search here, you will find an example. _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | sanketpatel | 
		  
		    
			  
				 Posted: Tue Nov 21, 2006 6:57 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 31 Oct 2006 Posts: 40
  
  | 
		  
		    
			  
				pls point me to that post....
 
 
i am not able to find... | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Tue Nov 21, 2006 7:02 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				Search for "remove namespaces", in this forum, for all words. _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | kimbert | 
		  
		    
			  
				 Posted: Tue Nov 21, 2006 7:22 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 29 Jul 2003 Posts: 5543 Location: Southampton 
  | 
		  
		    
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |