else if(actione.getName().equals("interceptor-ref")){
if(null==interceptorlist){
interceptorlist=new ArrayList<InterceptorInfo>();
}
String infoname=actione.attributeValue("name");
InterceptorInfo interinfo=null;
for(InterceptorInfo info:allinterceptor){
if(infoname.equals(info.getInterceptorname())){
interinfo=info;
break;
}
}
if(interinfo!=null){
//证明没有依赖基石文件,只是依赖了本身的配置文件
//添加拦截参数
List<Element> paramelist=actione.elements();
if(paramelist!=null){
Map<String, String> parammap=new HashMap<String, String>();
for(Element parame:paramelist){
parammap.put(parame.attributeValue("name"), parame.getText());
}
interinfo.setParammap(parammap);
}
interceptorlist.add(interinfo);
}else{
//interinfo为空,需要去基石文件中的拦截器列表去找
List<InterceptorInfo> fatherinterlist=ConstantMVC.DEFAULTMVCINFO.getAllinterceptor();
for(InterceptorInfo info:fatherinterlist){
if(infoname.equals(info.getInterceptorname())){
List<Element> paramelist=actione.elements();
if(paramelist!=null){
Map<String, String> parammap=new HashMap<String, String>();
for(Element parame:paramelist){
parammap.put(parame.attributeValue("name"), parame.getText());
}
info.setParammap(parammap);
}
interceptorlist.add(info);
break;
}
}
}
}
action.setInterceptorlist(interceptorlist);
action.setResultmap(resultmap);
action.setStacklist(stacklist);
}
String key=action.getActionname().split("_")[0];
actionmap.put(key, action);
}
mvc.setIncludefilelist(includefilelist);
mvc.setAllinterceptor(allinterceptor);
mvc.setStackmap(stackmap);
mvc.setPackageobj(pack);
mvc.setActionmap(actionmap);
}
if(null==ConstantMVC.BEIFENGMVCMAP){
ConstantMVC.BEIFENGMVCMAP=new HashMap<String, BeifengMvc>();
ConstantMVC.BEIFENGMVCMAP.put(filelocation, mvc);
}
} catch (DocumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
分享到:
相关推荐
一款php xml读取类,很简单的一个xml分析类了,它可读取指它xml文档,并且输出或取得指定节点的xml数据,本xml类代码是利用了php domdocument来解析xml文档。
内容:博客代码 一次代码重构之旅-快速读写xml文件工具类封装 http://blog.csdn.net/lk_blog/article/details/8220803
使用C#读取XML文件的简单操作类 xml .net
用WC3的DOM实现对XML文件的读取。 方法摘要: //通过文件路径及文件名读取xml public XMLReader(String path, String filename); //初始化读取包下的的XML文件 public XMLReader(Package package1, String fileName)...
C++ 读取xml文件,专门针对xml类型文件的C++读取代码,可帮助需要这类读文件的童鞋参考
c#读写XML文件 简单易用的代码 希望对你有用!!!
本人没分了,特别来分享一下,通用的XML读写工具类,同志们下下绝对不后悔
XML读写配置文件类封装
c++读取XML配置文件C++中并没有操作XML文件的标准库,因此大家需要使用各自熟悉的XML库来解决XML文件的读取与写入。XML的一个重要用途是作为程序的配置文件,存储程序运行相关的各种数据。本文总结了使用libxml2库来...
直接读写XML文件的函数,包含示例程序和源码。
XML文件的读写,这个类包括了XML文件的读取,操作,以及写等设计XML技术的所有操作
XML文件的读写操作类封装的代码, 可以根据XML文件格式进行灵活的读写操作、获取标签、节点的属性等……
基于dom4j的读写xml文件的工具包。封装了dom4j操作xml文档的常和方法。 支持两种读写方法。1:针对小文件的读取整个文档,2:针对大文件的,逐行读取。读到几百M文件毫无压力。
java递归读取xml文件
C# XML文件读写操作源码,以及如何调用,注释详解,有任何问题请留言, 以下截取xml文件和部分调用代码段: * ++++++++++++++++++++++++++++++++++++++ <?xml version="1.0" encoding="utf-8" standalone="no"?&...
提供一款php xml读取类,很简单的一个xml分析类了,它可读取指它xml文档,并且输出或取得指定节点的xml数据,本xml类代码是利用了php domdocument来解析xml文档。
这是一个基于MFC的XML文档的读写封装类,利用了tinyXML的解析器进行解析,然后处理解析树,并将信息封装到了具体实例中,实现了对XML文档的读写操作。 如果对XML读写有疑惑可以下下来看一看~相信会有帮助
VB读取XML文件的操作实例,演示读取XML各个定义键的值。程序是一个专一读取XML文件的VB类,并没有使用微软的XML.DLL。因此比较有参考价值,很不错。
一个VC的XML类,打开文件把Markup.cpp,Markup.h加载到项目中就可以使用了,很好的XML类,方便XML文件的生成和解析
asp.net读取XML XMLHelper c#读取xml 通用类