public static void main(String[] args) throws Exception {
		
		SAXBuilder sb = new SAXBuilder();
		
		Document doc = sb.build(new File("jdom.xml"));
		
		Element element = doc.getRootElement();
		
		System.out.println(element.getName());
		
		Element student = element.getChild("学生");
		
		System.out.println(student.getText());
		
		@SuppressWarnings("rawtypes")
		List list = student.getAttributes();
		
		for(Object a:list)
		{
			System.out.print(((Attribute)a).getName() + "=");
			System.out.println(((Attribute)a).getValue());
		}
		
		student.removeChild("地址");
		
		XMLOutputter out = new XMLOutputter();
		
		out.setFormat(Format.getPrettyFormat());
		
		out.output(element, new FileOutputStream("jdom1.xml"));
		
	}