| Author | 
		  Message
		 | 
		
		  | vsethi007 | 
		  
		    
			  
				 Posted: Thu Apr 17, 2008 9:15 am    Post subject: Add header in XML | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 17 Apr 2008 Posts: 19
  
  | 
		  
		    
			  
				Hi
 
 
I need to add a header in XML
 
<?Siebel-Property-Set EscapeNames="false"?> 
 
 
I tried using two approaches :
 
 
1 Approach
 
SET OutputRoot.XML.(XML.XmlDecl).(XML.Siebel-Property-Set)=''; 
 
SET OutputRoot.XML.(XML.XmlDecl).(XML."EscapeNames")='true';
 
 
2 Approach
 
SET OutputRoot.XMLNS.(XML.XmlDecl)"Siebel-Property-Set" =''; 
 
SET OutputRoot.XMLNS.(XML.XmlDecl)"Siebel-Property-Set".(XML.attr)"EscapeNames" = 'true';
 
 
but it din't worked out, Could anyone plese help how to do that. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Thu Apr 17, 2008 2:14 pm    Post subject: Re: Add header in XML | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| vsethi007 wrote: | 
   
  
	| it din't worked out | 
   
 
 
 
What happened in each case - "it didn't work out" isn't a lot to go on. Error messages, posting of a section of user trace, amy other information? Version of WMB?
 
 
Help us to help you. _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | kimbert | 
		  
		    
			  
				 Posted: Thu Apr 17, 2008 2:35 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 29 Jul 2003 Posts: 5543 Location: Southampton 
  | 
		  
		    
			  
				Never use the XML domain in a new message flow. XMLNS is identical apart from its namespace support. XMLNSC is faster ( on v6 ), much faster and has more features ( on v6,1 ) and is the recommended parser for new flows.
 
 
   
	| Quote: | 
   
  
	I need to add a header in XML
 
<?Siebel-Property-Set EscapeNames="false"?>  | 
   
 
You don't need to add a header. You need to add a processing instruction. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | vsethi007 | 
		  
		    
			  
				 Posted: Fri Apr 18, 2008 7:12 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 17 Apr 2008 Posts: 19
  
  | 
		  
		    
			  
				Thanks for your responses 
 
I am using WMB Toolkit version 6.0.2
 
 
for below  approach
 
 
SET OutputRoot.XML.(XML.XmlDecl)"Siebel-Property-Set" = ''; 
 
SET OutputRoot.XML.(XML.XmlDecl)"EscapeNames" = 'false'; 
 
 
the exception tree is:
 
<ExceptionData>
 
 <RecoverableException>
 
  <File>F:\build\S600_P\src\DataFlowEngine\ImbMqOutputNode.cpp</File>
 
  <Line>782</Line>
 
  <Function>ImbMqOutputNode::evaluate</Function>
 
  <Type>ComIbmMQOutputNode</Type>
 
  <Name>test12#FCMComposite_1_2</Name>
 
  <Label>test12.MQOutput</Label>
 
  <Catalog>BIPv600</Catalog>
 
  <Severity>3</Severity>
 
  <Number>2230</Number>
 
  <Text>Caught exception and rethrowing</Text>
 
  <ParserException>
 
   <File>F:\build\S600_P\src\MTI\MTIforBroker\GenXmlParser2\XmlImbParser.cpp</File>
 
   <Line>380</Line>
 
   <Function>XmlImbParser::refreshBitStreamFromElements</Function>
 
   <Type>ComIbmComputeNode</Type>
 
   <Name>test12#FCMComposite_1_3</Name>
 
   <Label>test12.Compute</Label>
 
   <Catalog>BIPv600</Catalog>
 
   <Severity>3</Severity>
 
   <Number>5010</Number>
 
   <Text>XML Writing Errors have occurred</Text>
 
   <ParserException>
 
    <File>F:\build\S600_P\src\MTI\MTIforBroker\GenXmlParser2\XmlImbParser.cpp</File>
 
    <Line>837</Line>
 
    <Function>XmlImbParser::checkForBodyElement</Function>
 
    <Type></Type>
 
    <Name></Name>
 
    <Label></Label>
 
    <Catalog>BIPv600</Catalog>
 
    <Severity>3</Severity>
 
    <Number>5005</Number>
 
    <Text>No valid body of the document could be found.</Text>
 
   </ParserException>
 
  </ParserException>
 
 </RecoverableException>
 
</ExceptionData>
 
 
 
for below Approach
 
SET OutputRoot.XMLNS.(XML.XmlDecl)"Siebel-Property-Set" =''; 
 
SET OutputRoot.XMLNS.(XML.XmlDecl)"Siebel-Property-Set".(XML.attr)"EscapeNames" = 'true';
 
			
 
 
the exception tree is:
 
<ExceptionData>
 
 <RecoverableException>
 
  <File>F:\build\S600_P\src\DataFlowEngine\ImbMqOutputNode.cpp</File>
 
  <Line>782</Line>
 
  <Function>ImbMqOutputNode::evaluate</Function>
 
  <Type>ComIbmMQOutputNode</Type>
 
  <Name>test12#FCMComposite_1_2</Name>
 
  <Label>test12.MQOutput</Label>
 
  <Catalog>BIPv600</Catalog>
 
  <Severity>3</Severity>
 
  <Number>2230</Number>
 
  <Text>Caught exception and rethrowing</Text>
 
  <ParserException>
 
   <File>F:\build\S600_P\src\MTI\MTIforBroker\GenXmlParser2\XmlImbParser.cpp</File>
 
   <Line>380</Line>
 
   <Function>XmlImbParser::refreshBitStreamFromElements</Function>
 
   <Type>ComIbmComputeNode</Type>
 
   <Name>test12#FCMComposite_1_3</Name>
 
   <Label>test12.Compute</Label>
 
   <Catalog>BIPv600</Catalog>
 
   <Severity>3</Severity>
 
   <Number>5010</Number>
 
   <Text>XML Writing Errors have occurred</Text>
 
   <ParserException>
 
    <File>F:\build\S600_P\src\MTI\MTIforBroker\GenXmlParser2\XmlImbParser.cpp</File>
 
    <Line>837</Line>
 
    <Function>XmlImbParser::checkForBodyElement</Function>
 
    <Type></Type>
 
    <Name></Name>
 
    <Label></Label>
 
    <Catalog>BIPv600</Catalog>
 
    <Severity>3</Severity>
 
    <Number>5005</Number>
 
    <Text>No valid body of the document could be found.</Text>
 
   </ParserException>
 
  </ParserException>
 
 </RecoverableException>
 
</ExceptionData> | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Fri Apr 18, 2008 10:46 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| vsethi007 wrote: | 
   
  
	for below Approach
 
SET OutputRoot.XMLNS.(XML.XmlDecl)"Siebel-Property-Set" =''; 
 
SET OutputRoot.XMLNS.(XML.XmlDecl)"Siebel-Property-Set".(XML.attr)"EscapeNames" = 'true';
 
 | 
   
 
 
 
That's still trying to create an xml declaration not a processing instruction. Using a construct in the wrong domain. _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | kimbert | 
		  
		    
			  
				 Posted: Fri Apr 18, 2008 10:57 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 29 Jul 2003 Posts: 5543 Location: Southampton 
  | 
		  
		    
			  
				There's a good reason why you are getting an exception. You are building an output tree which contains an XML declaration in the body of the document.. 
 
You should be building a message tree with a processing instruction.
 
 
Try this:
 
   
	| Code: | 
   
  
	| Set OutputRoot.XMLNSC.(XMLNSC.ProcessingInstruction)"Siebel-Property-Set" = ''; | 
   
 
Or, if you insist on using XMLNS,
 
   
	| Code: | 
   
  
	| Set OutputRoot.XMLNS.(XML.ProcessingInstruction)"Siebel-Property-Set" = ''; | 
   
 
 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | vsethi007 | 
		  
		    
			  
				 Posted: Mon Apr 21, 2008 7:11 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 17 Apr 2008 Posts: 19
  
  | 
		  
		    
			  
				Hi Everybody
 
 
Thanks so much for help
 
The approach told to me...
 
 
Set OutputRoot.XMLNS.(XML.ProcessingInstruction)"Siebel-Property-Set" = '';
 
it worked out well.
 
 
this will give me output like this <?Siebel-Property-Set ?>
 
But i need to create this complete tag <?Siebel-Property-Set EscapeNames = "true"  ?>
 
 
so i changed the code like this..
 
Set OutputRoot.XML.(XML.ProcessingInstruction)"Siebel-Property-Set EscapeNames = ""true"" " = ''; to get the required output.
 
 
it gave me the output what i wanted,
 
Just need to know am I following the right method.
 
 
Thanks in advance
 
Vivek | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | kimbert | 
		  
		    
			  
				 Posted: Mon Apr 21, 2008 11:04 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 29 Jul 2003 Posts: 5543 Location: Southampton 
  | 
		  
		    
			  
				Your approach is fine.
 
I've made a mental note to improve the documentation about processing instructions when I get a chance. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |