300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > 读取SPRING XML配置文件中的hbm.xml 文件列表.

读取SPRING XML配置文件中的hbm.xml 文件列表.

时间:2023-04-25 14:18:26

相关推荐

读取SPRING XML配置文件中的hbm.xml 文件列表.

String P="E://baosteel_sgm//src//ApplicationContext.xml";

SAXReader saxReader = new SAXReader();

Document document = saxReader.read(new File(P));

//查询Element

String xpath ="/beans/bean[@id='sessionFactory']/property[@name='mappingResources']/list/value";//查询属性type='ondDelete'的composite

String oridir="E://baosteel_sgm//src//";

List sf= document.selectNodes(xpath);

for(int i=0;i

{

Element node=(Element) sf.get(i);

String file=oridir+ node.getText();

BOMRemover.trimBom(file);

System.out.println(node.getText());

}

Powered by Zoundry

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。