| Author | 
		  Message
		 | 
		
		  | alanuzi | 
		  
		    
			  
				 Posted: Thu Aug 11, 2011 1:59 am    Post subject: Setting the Opaque Element value | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 10 Aug 2011 Posts: 3
  
  | 
		  
		    
			  
				Hi, 
 
 
I am having difficulty in using the correct eSQL element name or X-Path name to leave an element of my XML unparsed.  I do not want to access any of the child elements of this XML section, only use the whole section as a character string.
 
 
My setup is a MQInput node receiving XML (containing exception details) from a queue and passing it to a compute node which extracts data from the XML and calls a stored procedure.  On the MQInput node Validation is set to none, message domain is XMLNSC and Parsing timing is 'On Demand'.
 
 
the xml is similar to this:
 
 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 
<Exception>
 
  <ErrorReportingSystem>
 
 
    ...other tags...
 
 
    <ExceptionText>
 
      <File>/build/S610P/src/DataFlowEngine/BasicNodes/ImbThrowNode.cpp</File>
 
      <Line>265</Line>
 
      <Function>ImbThrowNode::evaluate</Function>
 
      <Type>ComIbmThrowNode</Type>
 
      <Name>Exception_Test#FCMComposite_1_3</Name>
 
      <Label>Exception_Test.Throw</Label>
 
      <Catalog>BIPv610</Catalog>
 
      <Severity>1</Severity>
 
      <Number>3020</Number>
 
      <Text>User exception thrown by throw node</Text>
 
      <Insert>
 
        <Type>5</Type>
 
        <Text>Exception Test Message - lets see what happens </Text>
 
      </Insert>
 
    </ExceptionText>
 
  </ErrorReportingSystem>
 
</Exception>
 
 
(The ExceptionText is the most nested exception thrown from any flow which uses my error handling subflow.)
 
 
Unfortunately the info centre page doesn't have an example.  I have tried the following opaque element settings:
 
 
//Exception/ErrorReportingSystem/ExceptionText
 
//XMLNSC/Exception/ErrorReportingSystem/ExceptionText
 
//WMQI_Message/Exception/ErrorReportingSystem/ExceptionText
 
//WMQI_Message/XMLNSC/Exception/ErrorReportingSystem/ExceptionText
 
//Root/XMLNSC/Exception/ErrorReportingSystem/ExceptionText
 
//InputRoot/XMLNSC/Exception/ErrorReportingSystem/ExceptionText
 
//Message/XMLNSC/Exception/ErrorReportingSystem/ExceptionText
 
 
Could anyone please advise? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | marko.pitkanen | 
		  
		    
			  
				 Posted: Thu Aug 11, 2011 3:21 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Chevalier
 
 Joined: 23 Jul 2008 Posts: 440 Location: Jamsa, Finland 
  | 
		  
		    
			  
				Hi
 
 
Have you tried //ExceptionText ?
 
If I remember //ExceptionText means when ever element exists in xpath notation.
 
 
--
 
Marko | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | alanuzi | 
		  
		    
			  
				 Posted: Thu Aug 11, 2011 3:40 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 10 Aug 2011 Posts: 3
  
  | 
		  
		    
			  
				Hi Marko, 
 
 
That worked great, thanks for your help
 
 
alan | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | alanuzi | 
		  
		    
			  
				 Posted: Thu Aug 11, 2011 4:23 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 10 Aug 2011 Posts: 3
  
  | 
		  
		    
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Thu Aug 11, 2011 4:41 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | EnOne | 
		  
		    
			  
				 Posted: Thu May 24, 2012 5:45 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Centurion
 
 Joined: 09 Oct 2002 Posts: 101 Location: Kansas City 
  | 
		  
		    
			  
				I am trying to use opaque parsing using XMLNSC Parser options on the input note XPath and using the above example and information from the w3schools (http://www.w3schools.com/xpath/xpath_syntax.asp) all these should work 
 
 
   
	| Code: | 
   
  
	
 
/XMLNSC/Exception/ErrorReportingSystem/ExceptionText 
 
//Exception/ErrorReportingSystem/ExceptionText
 
//ErrorReportingSystem/ExceptionText
 
//ExceptionText  | 
   
 
 
 
but only the following one does and it has to search the each element of the XMLTree for instances of the ExceptionText element.
 
 
 
 
I tried using "." and "/" as a separator and any search for parent/child combination failed
 
 
what would I use to get Opaque parsing to work with parent/child combinations? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | lancelotlinc | 
		  
		    
			  
				 Posted: Thu May 24, 2012 5:50 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Knight
 
 Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA 
  | 
		  
		    
			  
				kimbert is the best expert on this topic.
 
 
I found this which may help you:
 
 
   
	| Quote: | 
   
  
	| Each opaque element must be specified as an ESQL element name or an XPath expression of the form //prefix:name (or //name, if your input document does not contain namespaces). | 
   
 
 
 
If XPath is not working for you, you may try ESQL syntax while we're waiting for kimbert... _________________ http://leanpub.com/IIB_Tips_and_Tricks
 
Save $20: Coupon Code: MQSERIES_READER | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mqjeff | 
		  
		    
			  
				 Posted: Thu May 24, 2012 5:54 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Master
 
 Joined: 25 Jun 2008 Posts: 17447
  
  | 
		  
		    
			  
				| You may need to include namespace qualifiers in your XPath expression. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | EnOne | 
		  
		    
			  
				 Posted: Thu May 24, 2012 6:05 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Centurion
 
 Joined: 09 Oct 2002 Posts: 101 Location: Kansas City 
  | 
		  
		    
			  
				| I am not using namespaces but do I need to specify a lack of a namespace? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | kimbert | 
		  
		    
			  
				 Posted: Thu May 24, 2012 6:08 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 29 Jul 2003 Posts: 5543 Location: Southampton 
  | 
		  
		    
			  
				
   
	| Quote: | 
   
  
	| all these should work | 
   
 
No - only the last one should work. As lancelotinc has pointed out, this is documented here:
 
http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/topic/com.ibm.etools.mft.doc/ac21000_.htm
 
   
	| Quote: | 
   
  
	| but only the following one does and it has to search the each element of the XMLTree for instances of the ExceptionText element. | 
   
 
Almost right, but you are making an invalid assumption about how the XMLNSC parser works. I'm not going to explain that remark, but I can assure you that it's just as efficient as the other forms. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |