getting node value exception
        Posted  
        
            by 
                Aswan
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Aswan
        
        
        
        Published on 2010-12-21T12:48:35Z
        Indexed on 
            2010/12/21
            12:54 UTC
        
        
        Read the original article
        Hit count: 242
        
Hi Folks
<amount currency="USD">1000500</amount> 
while parsing above string i am getting only attribute value .when i try to get node value null pointer exception
for getting node value using
 NodeList amountList= estimateElement.getElementsByTagName("amount");
 Element amtElement= (Element)amountList.item(0);
 String amount=amtElement.getFirstChild().getnodevalue()
Thanks in advance
Aswan
© Stack Overflow or respective owner