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 getDirectories(Node node) {
        NodeList nList = node.getChildNodes();
        Vector directoryNodes = new Vector();
        for (int i = 0; i < nList.getLength(); i++) {
            Node kidNode = nList.item(i);
            if (kidNode.getNodeName().equals("directory")) {
                directoryNodes.addElement(kidNode);
            }
        }
        return directoryNodes;
    }
}