public static void read() {
		DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
		try {
			DocumentBuilder builder = dbf.newDocumentBuilder();
			InputStream in = TestDom.class.getClassLoader()
					.getResourceAsStream("text.xml");
			Document doc = builder.parse(in);
			// root <university>
			Element root = doc.getDocumentElement();
			if (root == null)
				return;
			System.err.println(root.getAttribute("name"));
			// all college node
			NodeList collegeNodes = root.getChildNodes();
			if (collegeNodes == null)
				return;
			for (int i = 0; i < collegeNodes.getLength(); i++) {
				Node college = collegeNodes.item(i);
				if (college != null
						&& college.getNodeType() == Node.ELEMENT_NODE) {
					System.err.println("\t"
							+ college.getAttributes().getNamedItem("name")
									.getNodeValue());
					// all class node
					NodeList classNodes = college.getChildNodes();
					if (classNodes == null)
						continue;
					for (int j = 0; j < classNodes.getLength(); j++) {
						Node clazz = classNodes.item(j);
						if (clazz != null
								&& clazz.getNodeType() == Node.ELEMENT_NODE) {
							System.err.println("\t\t"
									+ clazz.getAttributes()
											.getNamedItem("name")
											.getNodeValue());
							// all student node
							NodeList studentNodes = clazz.getChildNodes();
							if (studentNodes == null)
								continue;
							for (int k = 0; k < studentNodes.getLength(); k++) {
								Node student = studentNodes.item(k);
								if (student != null
										&& student.getNodeType() == Node.ELEMENT_NODE) {
									System.err.print("\t\t\t"
											+ student.getAttributes()
													.getNamedItem("name")
													.getNodeValue());
									System.err.print(" "
											+ student.getAttributes()
													.getNamedItem("sex")
													.getNodeValue());
									System.err.println(" "
											+ student.getAttributes()
													.getNamedItem("age")
													.getNodeValue());
								}
							}
						}
					}
				}
			}
		} catch (ParserConfigurationException e) {
			e.printStackTrace();
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (SAXException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}

	}