现在遇到一个问题,在oa系统中如何实现这样一个功能呢: 
    在系统中增加一个“导出”菜单,将选中的公文导出为xml格式文件放到指定的目录里, 
    并且可以对其进行配置,而且用插件形式进行开发? 
请教各位高手给指点指点思路,谢谢

解决方案 »

  1.   

    将选中的公文导出为xml格式文件放到指定的目录里
    是下载到客户端,还是放到服务器某个目录中?
    选中的公文导出为xml格式文件,这个要根据你的公文格式来, 一般你提取出几个要素,就差不多了
      

  2.   

    你的XML文件应该是个固定的格式啊。用Dom去做啊。
      

  3.   

    公文应该是doc格式,
    具体怎么操作能否详细点说
    我是头次遇到这样的问题
    谢谢
      

  4.   

    我们公司的不全
    祝福楼主  但愿能抛砖引玉import java.io.File;
    import java.io.InputStream;
    import java.io.Serializable;
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.Vector;import com.creawor.meip.common.Log;
    /**
     * 对文件内容进行解析,不同的文件格式引用不同的解析器
     * 对于Excel文件,调用Excel解析器
     * 对于非Excel文件,调用ContentFormat解析器
     * @author 许锡标
     * Created on 2003-4-23
     */
    public abstract class FormatFactory implements Serializable {
    // public String fileName = null;

    public abstract void setFormatStyle(String value, String colEnd);
    public abstract void setMaxError(int value);
    public abstract int parse() throws Exception;
    //修改上传通讯录因连续两个分隔符解析错误的问题,
    //为了不兼容其它类调用,此处增加 一个方法,在上传通讯录时用此方法。  modify by cza 20051227 
    public abstract int parse2() throws Exception;
    public abstract int parse(int startrow) throws Exception;
    public abstract int getRows();
    public abstract int getColumns();
    public abstract Vector getErrorLine();
    public abstract String getValue(int row, int col);
    public abstract String getFileStr();
    public abstract String getNotCharsetValue(int row,int col);
    //andrewwnag add 
    public abstract ArrayList getColumnValue(int col);
    public abstract HashMap getDeptHashMapTree(int startRow, int deptCol) ;
    public abstract int getDeptCount(); 

    public abstract boolean isExcel();

    /**
     * 新增加上传过的文件参数
     */
    public InputStream uploadedFile = null;

    public static FormatFactory newInstance(String fileName) {
    String factoryName = "";
    if (fileName.indexOf(".xls") > 1) {
    factoryName = "com.creawor.meip.format.ExcelFormat";
    } else {
    factoryName = "com.creawor.meip.format.ContentFormat";
    }
    FormatFactory ff;
    try {
    Class clazz = Class.forName(factoryName);
    ff = (FormatFactory) clazz.newInstance();
    return ff;
    } catch (Exception e) {
    e.printStackTrace();
    Log.log("ConnectionFactory Exception:" + e.toString());
    return null;
    }
    }
    public InputStream getUploadedFile() {
    return uploadedFile;
    }
    public void setUploadedFile(InputStream uploadedFile) {
    this.uploadedFile = uploadedFile;
    }
    }