Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import org.w3c.dom.*;

import java.util.Vector;

public class Main {
    public static Vector findChildren(Node node, String elTag) {
        NodeList children = node.getChildNodes();
        Vector items = new Vector();
        for (int i = 0; i < children.getLength(); i++) {
            Node item = children.item(i);
            if (item.getNodeName().equals(elTag)) {
                items.add(item);
            }
        }
        return items;
    }
}