Code example for Element

Methods: getFirstChild

0
         
        } 
         
        private String getCharacterDataFromElement(Element e) {
            try { 
                Node child = e.getFirstChild();
                if(child instanceof CharacterData) {
                    CharacterData cd = (CharacterData) child;
//                    return cd.getData(); 
                    return cd.getStringValue();
                } 
            } 
            catch(Exception ex) {
         
            } 
            return ""; 
        } //private String getCharacterDataFromElement 
         
        protected float getFloat(String value) {
          if(value != null && !value.equals("")) {
             return Float.parseFloat(value);