package org.ifocus.crawler.main;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.List;
import java.util.Properties;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.JDOMException;
import org.jdom.Text;
import org.jdom.input.SAXBuilder;
public class ReadConfiguration {
//读取xml的配置文件
public void readXml(String path) throws JDOMException, IOException {
SAXBuilder builder = new SAXBuilder(false);
Document document = builder.build(path);
Element site = document.getRootElement();
Element bd = site.getChild("bd");
System.out.println(bd.getChildText("name"));