Java XML Element Find getAllElements(Element element)

Here you can find the source of getAllElements(Element element)

Description

get All Elements

License

Open Source License

Declaration

public static NodeList getAllElements(Element element) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Educational Online Test Delivery System Copyright (c) 2014 American
 * Institutes for Research//from   ww w. ja  v a 2s  . c  o m
 * 
 * Distributed under the AIR Open Source License, Version 1.0 See accompanying
 * file AIR-License-1_0.txt or at http://www.smarterapp.org/documents/
 * American_Institutes_for_Research_Open_Source_Software_License.pdf
 ******************************************************************************/

import org.w3c.dom.Document;
import org.w3c.dom.Element;

import org.w3c.dom.NodeList;

public class Main {
    public static NodeList getAllElements(Document document) {
        return document.getElementsByTagName("*");
    }

    public static NodeList getAllElements(Element element) {
        return element.getElementsByTagName("*");
    }
}

Related

  1. findElementAsString(final Element e, final String find)
  2. findElementWithId(String id, Element root)
  3. findNodesByType(Element topElm, int type)
  4. findNodeValue(Element firstElement, String name)
  5. getAllElements(Element config, String elementName)
  6. getAllElements(Node context)
  7. getAllElementsByTagName(Element elem, String name)
  8. getAllLeaveValues(Element element)
  9. getAllNodeNames(Element ele)