|
u,noTop);
String result=builder.getXmlResult()
XmlOutput out=new XmlOutput(filepath); out.setEncoding(encoding); out.Output(result); }catch(Exception ee){ System.out.println(ee.getMessage()); System.out.println(\"写入Xml文件:\"+filepath+\" 出错\"); } } public int getIndex(){ return Index; } public String getCurrentNodeName(){ return markName } public document.nbspgetdocument.ource(){ return doc } public void setHeader(String Header){ if(Header!=null&&Header.length() >0){ header=Header; } } } XMLToolFactory.class 代码如下:
package com.ceic.workflow.xml;
import com.ceic.workflow.xml.Tool.XMLToolTest; import java.util.*; /** * XMLTool的工厂类。为其它类提供XML处理工具的 运算和实现部分的类。 */ public class XMLToolFactory { private static Hashtable table; private static String defaultType; private static String ower; /** * @roseuid 3ECC2FC101BF */ private XMLToolFactory() {
} /** * 获得一个常用XMLTool. * @return com.ceic.workflow.xml.XMLTool * @roseuid 3ECC2243019B */ public static XMLTool getXMLTool() { try{ return ((XMLTool)Class.forName(table.get(ower). toString()).newInstance()); }catch(Exception ee){ System.out.println(\"获得常用XMLTool出错\"); return null; } } /** * 获得一个XMLTool.通过参数获得XMLTool的一个实现子类. * @param type - XMLTool已实现子类在XMLToolFactory中的type名 * @param classname - * XMLTool实现子类的class名(包含package名), * 如com.ceic.workflow.xml.tool.XMLToolTest * .默认为null或空字符串。 * @return com.ceic.workflow.xml.XMLTool * @roseuid 3ECC2243019B */ public static XMLTool getXMLTool(String type, String classname) { try{ if(上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] 下一页 |
|
|
|
|
|
|
|