[jdom-interest] Null Pointer Exception from getTextTrim() method
    Anand, Rajesh 
    Rajesh_Anand at ml.com
       
    Thu Jun 23 03:04:55 PDT 2005
    
    
  
Folks,
	here is my code snippet....
	Line1 - Element childelem2 = element.getChild("ClosingPrice",
element.getNamespace());
			
	Line 2 -String date[x] =  childelem1.getTextTrim();
	and here is the part of XML I'm trying to read...
	<getIndex:Price> 
	
<getIndex:PriceEffectiveDate>2005-05-10</getIndex:PriceEffectiveDate> 
	<getIndex:ClosingPrice>2.99</getIndex:ClosingPrice> 
	</getIndex:Price>
	So, why is the 2nd line giving me Null Pointer error instead of
returning a value of "2.99"??
	Any helps will be greatly appreciated.
Rajesh Anand
Email:Rajesh_anand at ml.com
--------------------------------------------------------
If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Click here for important additional terms relating to this e-mail.     http://www.ml.com/email_terms/
--------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.jdom.org/pipermail/jdom-interest/attachments/20050623/289170c5/attachment.htm
    
    
More information about the jdom-interest
mailing list