| Author | 
		  Message
		 | 
		
		  | sk531 | 
		  
		    
			  
				 Posted: Mon May 02, 2011 6:57 am    Post subject: Getting XML Parsed Exception while getting the EVENT data | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 17 Feb 2010 Posts: 9
  
  | 
		  
		    
			  
				My flow looks as below: Basically it is related Monitoring event data xmls
 
MQI/p-->Compute Node --> WTX Map -->MQo/p
 
 
The compute node getting a column value as BLOB from the database which have a two XML's(mentioned below). When I am trying to extract the values from that by doing like this : 
   
	| Quote: | 
   
  
	| CREATE LASTCHILD OF OutputRoot DOMAIN('XMLNSC') PARSE(QueryResult.Data.ResultSet[I].ColumnValue); | 
   
 
 
 
The returned ColumValue looks like: 
   
	| Quote: | 
   
  
	| "<?xml version="1.0"?><LogEvent xmlns:wmb=....>......<MQMD>....</MQMD><MRM><INPUTGROUP><NUMBER>123</NUMBER></INPUTGROUP><OUTPUTGROUP>HH</OUTPUTGROUP></MRM></Root></wmb:complexContent></wmb:applicationData></event></LogEvent></LogEvent><?xml version="1.0"?><LogEvent xmlns:wmb=....>......<wmb:applicationData><wmb:complexContent wmb:elementName="OUTPUTGROUP"><OUTPUTGROUP>HH</OUTPUTGROUP></wmb:complexContent></wmb:applicationData></event></LogEvent>" | 
   
 
 
 
I want to extract the values of <INPUTGROUP> and <OUTPUTGROUP> elements from the first xml only, I don't need the second xml.
 
When i use the above mentioned code,I am getting "XML Parsing Errors have occurred". Also, i have tried by using ResetContentDescriptior node then getting the same error. I am thinking that the returned column value have two xml's that is the reason I am getting this exception.
 
Please help me out to resolve this issue?
 
 
Also, i am thinking that sending the BLOB value directly to WTX Map then the map have to extract the content of <INPUTGROUP> and <OUTPUTGROUP>. I don't know map should be able to do this since i am not a WTX guy? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Mon May 02, 2011 7:00 am    Post subject: Re: Getting XML Parsed Exception while getting the EVENT dat | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| sk531 wrote: | 
   
  
	| I am thinking that the returned column value have two xml's that is the reason I am getting this exception. | 
   
 
 
 
I'm thinking you're right
 
 
   
	| sk531 wrote: | 
   
  
	| Please help me out to resolve this issue? | 
   
 
 
 
Don't embedd one XML document in another like that - it's not valid (in XML terms not WMB terms - check out the W3C specification). _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mqjeff | 
		  
		    
			  
				 Posted: Mon May 02, 2011 7:09 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Master
 
 Joined: 25 Jun 2008 Posts: 17447
  
  | 
		  
		    
			  
				| They aren't strictly embedded.  They appear to be just concatenated. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | sk531 | 
		  
		    
			  
				 Posted: Mon May 02, 2011 7:12 am    Post subject: Getting XML Parsed Exception while getting the EVENT data | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 17 Feb 2010 Posts: 9
  
  | 
		  
		    
			  
				Thanks Vitor.
 
I am not embedding that xml's, the EVENT data itself populating in the database when you use monitoring on the WMB nodes. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Mon May 02, 2011 7:35 am    Post subject: Re: Getting XML Parsed Exception while getting the EVENT dat | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| sk531 wrote: | 
   
  
	| I am not embedding that xml's, the EVENT data itself populating in the database when you use monitoring on the WMB nodes. | 
   
 
 
 
What database and what version of WMB?
 
 
My event messages don't look like that. _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | sk531 | 
		  
		    
			  
				 Posted: Mon May 02, 2011 8:02 am    Post subject: Re: Getting XML Parsed Exception while getting the EVENT dat | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 17 Feb 2010 Posts: 9
  
  | 
		  
		    
			  
				My versions are WMB 7.0, DB2 9.5
 
 
I remember i worked on other flow which had only one xml in the event data.
 
The event data should contain only one xml data right? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Mon May 02, 2011 8:25 am    Post subject: Re: Getting XML Parsed Exception while getting the EVENT dat | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| sk531 wrote: | 
   
  
	| The event data should contain only one xml data right? | 
   
 
 
 
Yes.
 
 
And I repeat my question "what database"? WMBv7 doesn't use one for anything, never mind monitoring events (which were not database rows in v6.1) so how is this information getting into a database & why is whatever's adding it to the database mashing the XML like that? _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | sk531 | 
		  
		    
			  
				 Posted: Mon May 02, 2011 9:34 am    Post subject: Getting XML Parsed Exception while getting the EVENT data | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 17 Feb 2010 Posts: 9
  
  | 
		  
		    
			  
				hey Vitor,
 
Looks like i found the issue, I could see this in the SQL query, they are concatenating the two columns 
   
	| Quote: | 
   
  
	| SELECT B.DATA_VALUE ||Y.DATA_VALUE AS Response.....etc | 
   
 
 
 
I changed it to 
   
	| Quote: | 
   
  
	| SELECT B.DATA_VALUE AS Response...etc.. | 
   
 
 then I got the event data with one xml and also, i don't see the exception
 
 
Thanks | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | sk531 | 
		  
		    
			  
				 Posted: Mon May 02, 2011 11:55 am    Post subject: Getting XML Parsed Exception while getting the EVENT data | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 17 Feb 2010 Posts: 9
  
  | 
		  
		    
			  
				I solved the two xml issue, but I am getting null values to these CHAR variables: GROUP_NBR, OUT_GROUP. when I am parsing the returned values as below,
 
Did I miss something here, please help me?
 
 
   
	| Quote: | 
   
  
	DECLARE GROUP_NBR, OUT_GROUP CHARACTER;
 
CREATE LASTCHILD OF OutputRoot DOMAIN('XMLNSC') PARSE(OutputLocalEnvironment.BLOB.BLOB);
 
SET GROUP_NBR = OutputRoot.XMLNSC.LogEvent.event.applicationData.complexContent.Root.MRM.INPUTGROUP.NUMBER;
 
SET OUT_GROUP = OutputRoot.XMLNSC.LogEvent.event.applicationData.complexContent.Root.MRM.OUTPUTGROUP; | 
   
 
 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mqjeff | 
		  
		    
			  
				 Posted: Mon May 02, 2011 11:57 am    Post subject: Re: Getting XML Parsed Exception while getting the EVENT dat | 
				     | 
			   
			 
		   | 
		
		
		   Grand Master
 
 Joined: 25 Jun 2008 Posts: 17447
  
  | 
		  
		    
			  
				
   
	| sk531 wrote: | 
   
  
	I solved the two xml issue, but I am getting null values to these CHAR variables: GROUP_NBR, OUT_GROUP. when I am parsing the returned values as below,
 
Did I miss something here, please help me?
 
 
   
	| Quote: | 
   
  
	DECLARE GROUP_NBR, OUT_GROUP CHARACTER;
 
CREATE LASTCHILD OF OutputRoot DOMAIN('XMLNSC') PARSE(OutputLocalEnvironment.BLOB.BLOB);
 
SET GROUP_NBR = OutputRoot.XMLNSC.LogEvent.event.applicationData.complexContent.Root.MRM.INPUTGROUP.NUMBER;
 
SET OUT_GROUP = OutputRoot.XMLNSC.LogEvent.event.applicationData.complexContent.Root.MRM.OUTPUTGROUP; | 
   
 
 | 
   
 
 
 
OutputRoot.XMLNSC....Root.MRM doesn't make any sense in any way. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Mon May 02, 2011 12:02 pm    Post subject: Re: Getting XML Parsed Exception while getting the EVENT dat | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| sk531 wrote: | 
   
  
	| Did I miss something here, please help me? | 
   
 
 
 
You've still not explained what WMB Event messages are doing in a database.
 
 
I also echo the comments of my most worthy associate in that the ESQL you've posted is nonsensical. _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |