Get all XML child nodes of a parent node - Java XML

Java examples for XML:XML Element Child

Description

Get all XML child nodes of a parent node

Demo Code


//package com.java2s;

import org.w3c.dom.Element;

import org.w3c.dom.NodeList;

public class Main {
    /**//from www.  j av a2 s .  c  om
     * Get all child nodes of a parent node
     *
     * @param parent
     * @return
     */
    public static NodeList getNodeList(Element parent) {
        return parent.getChildNodes();
    }
}

Related Tutorials