| Author | Message | 
		
		  | remocx | 
			  
				|  Posted: Fri May 17, 2013 12:37 am    Post subject: help required for parsing message tree using JCN |   |  | 
		
		  | Novice
 
 
 Joined: 21 Dec 2012Posts: 13
 
 
 | 
			  
				| Hi, in message tree, for a particular sub-element, the name is empty but the value is present. I need to parse and fetch the value of this subelement and since the subelement name field is empty, I am getting a null pionter exception. How do i fetch this value? Below is the structure of the message tree:
 XMLNSC->ResponseHeader->ResponseBody->Edidata->(empty) --value.
 please help
  |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | kash3338 | 
			  
				|  Posted: Fri May 17, 2013 4:43 am    Post subject: Re: help required for parsing message tree using JCN |   |  | 
		
		  | Shaman
 
 
 Joined: 08 Feb 2009Posts: 709
 Location: Chennai, India
 
 | 
			  
				| 
   
	| remocx wrote: |  
	| for a particular sub-element, the name is empty but the value is present. |  
 How can the name of an element be empty? Can you please explain where you get this xml from?
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | dogorsy | 
			  
				|  Posted: Fri May 17, 2013 4:58 am    Post subject: Re: help required for parsing message tree using JCN |   |  | 
		
		  | Knight
 
 
 Joined: 13 Mar 2013Posts: 553
 Location: Home Office
 
 | 
			  
				| 
   
	| kash3338 wrote: |  
	| 
   
	| remocx wrote: |  
	| for a particular sub-element, the name is empty but the value is present. |  
 How can the name of an element be empty? Can you please explain where you get this xml from?
 |  
 or even better, append your xml message
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | kimbert | 
			  
				|  Posted: Fri May 17, 2013 1:50 pm    Post subject: |   |  | 
		
		  |  Jedi Council
 
 
 Joined: 29 Jul 2003Posts: 5543
 Location: Southampton
 
 | 
			  
				| dogorsy said: 
  I think it's probably the name of the syntax element in the message tree that is empty. There is probably a named parent element with an anonymous child node holding ( some or all of ) its value. 
	| Quote: |  
	| How can the name of an element be empty? |  
 
 
  Being picky, you don't actually need to parse anything. That has already been done for you. 
	| Quote: |  
	| I need to parse and fetch the value of this subelement |  The message broker API should sort out the details for you - just call MbElement.getValue() on the parent syntax element ( the one that does have a name ).
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | nukalas2010 | 
			  
				|  Posted: Sun May 19, 2013 1:03 am    Post subject: |   |  | 
		
		  |  Master
 
 
 Joined: 04 Oct 2010Posts: 220
 Location: Somewhere in the World....
 
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  |  |