#####################################
#  모든 Element 출력                # 
#####################################

작성자 : 장형화(hhjang97@venus.uos.ac.kr)
작성일 : 2004. 10. 08 
수정일 : 

설명 :
  Document 에 있는 모든 엘리먼트를 출력한다.

################################# ################################# #################################

import java.util.*;
import org.jdom.*;


	public static void main(String[] args) {
		
		DB2Schema db2schema = new DB2Schema();
		
		String fileName = args[0];
		Document domDoc = null;
		
		try {
			domDoc = db2schema.makeJDOMDocument(fileName);
		} catch (Exception se) {
			System.out.println("####### Rule 파일 파싱 에러 #######");
			System.out.println("fileName : " + fileName);
			se.printStackTrace();
		}
		
		Element rootElement = domDoc.getRootElement();
		db2schema.processDOMTree(rootElement);
		
	} // main




	public void processDOMTree(Element root) {
		System.out.println("Root Name : " + root.getName());

		// loop through child nodes
		List allChildren = root.getChildren();
		Iterator i = allChildren.iterator();
		String name = null;
		while (i.hasNext()) {
			Element element = (Element) i.next();
			name = element.getName();
			// System.out.println("Element Name : " + name);
			
			processDOMTree(element);
			
		} // while children
	} // processDOMTree


#################################
# 
#################################