您的位置:首页 > 其它

JAXP Dom 案例 对xml文件进行增加 查找 删除

2015-11-29 16:51 453 查看
利用 JAXP 对 XML文件 的处理,把xml当做一个数据库来对待

public class StudentDaoImplTest {

public static void main(String[] args) {

StudentDao dao = new StudentDaoImpl();

//     Student s = new Student();

//     s.setExamid("999");

//     s.setIdcard("1101");

//     s.setName("牛骞");

//     s.setLocation("河南");

//     s.setGrade(100);

//     dao.addStudent(s);

Student s = dao.findByExamid("999");

System.out.println(s);

//     boolean b = dao.delStudentByName("牛骞");

//     System.out.println(b);

}


View Code


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: