Code example for Element

Methods: getFirstChild

0
 
        if (elemList.isEmpty()) {
            return null; 
        } 
        Element desc = elemList.get(0);
        Node txt = desc.getFirstChild();
 
        if (txt != null &&
            txt.getNodeType() == Node.TEXT_NODE) {
 
            return txt.getNodeValue();
        } else { 
            return null; 
        } 
    } 
     
    /** 
     * Output XML as a string. 
     */ 
    public String toString()
    {