Code example for Element

Methods: getTextContent

     * elements are found it just returns the text of the first) 
    public String findElementText(Element element, int tagNameResId) {
        element = findElement(element, tagNameResId);
        if (element == null) return null;
        else return element.getTextContent();
     * Convenience function.  Finds all {@link Element}s of the name given by a resource ID. 
     * @param element an {@link Element} 
     * @param tagNameResId a resource ID referring to a string 
     * @return a {@link NodeList} 
    public NodeList findAllElements(Element element, int tagNameResId) {
        String elemName = getString(tagNameResId);
        return element.getElementsByTagName(elemName);