需求:将用户从数据库导出,并且导入另一个用户后更新其中一些表的数据值。
1、XML原始文件
?
<?xml version="1.0" encoding="UTF-8" ?> <database> <tables> <!-- 修改BUSINESS_SYSTEM表 --> <table name = "BUSINESS_SYSTEM"> <!-- 终端管理 --> <fields id="2"> <field IP = "xxxx.xxxx.xxxx.xxxx" /> <field PORT = "40009"/> </fields> <!-- 权限管理 --> <fields id="3"> <field IP = "xxxx.xxxx.xxxx.xxxx"/> <field PORT = "40001"/> </fields> <!-- 短彩信管理平台 --> <fields id="101"> <field IP = "xxxx.xxxx.xxxx.xxxx"/> <field PORT = "40004"/> </fields> <!-- 商户管理系统 --> <fields id="121"> <field IP = "xxxx.xxxx.xxxx.xxxx"/> <field PORT = "8080"/> </fields> <!-- 基础用户管理系统 --> <fields id="141"> <field IP = "xxxx.xxxx.xxxx.xxxx"/> <field PORT = "40001"/> </fields> <!-- 电子商务后台管理系统 --> <fields id="161"> <field IP = "xxxx.xxxx.xxxx.xxxx"/> <field PORT = "40006"/> </fields> <!-- 万能遥控器管理系统 --> <fields id="201"> <field IP = "xxxx.xxxx.xxxx.xxxx"/> <field PORT = "40013"/> </fields> <!-- 预付卡支付管理系统 --> <fields id="202"> <field IP = "xxxx.xxxx.xxxx.xxxx"/> <field PORT = "40014"/> </fields> <!-- 日志管理系统 --> <fields id="242"> <field IP = "xxxx.xxxx.xxxx.xxxx"/> <field PORT = "40023"/> </fields> <!-- 业务管理系统 --> <fields id="241"> <field IP = "xxxx.xxxx.xxxx.xxxx"/> <field PORT = "40010"/> </fields> </table> <!-- 修改property_value表 --> <table name = "PROPERTY_VALUE"> <!-- 数据库URL --> <fields PROPERTY_VALUE_ID="12"> <field VALUE = "jdbc:oracle:thin:@xxxx.xxxx.xxxx.xxxx:1521:orcl"/> </fields> <!-- log日志URL --> <fields PROPERTY_VALUE_ID="38"> <field VALUE = "jdbc:oracle:thin:@xxxx.xxxx.xxxx.xxxx:1521:orcl"/> </fields> <!-- ftp配置 --> <fields PROPERTY_VALUE_ID="13"> <field VALUE = "192.168.0.112"/> </fields> <!-- 域名 --> <fields PROPERTY_VALUE_ID="45"> <field VALUE = "http://192.168.0.104/"/> </fields> <!-- jsonP --> <fields PROPERTY_VALUE_ID="74"> <field VALUE = "http://xxxx.xxxx.xxxx.xxxx:40000"/> </fields> <!-- 重定向IP --> <fields PROPERTY_VALUE_ID="5"> <field VALUE = "xxxx.xxxx.xxxx.xxxx"/> </fields> <!-- 重定向PORT --> <fields PROPERTY_VALUE_ID="6"> <field VALUE = "40000"/> </fields> </table> <!-- 修改property_value表 --> <table name = "BG_PROPERTY_VALUE"> <!-- 数据库URL --> <fields BG_PROPERTY_VALUE_ID="2"> <field VALUE = "jdbc:oracle:thin:@xxxx.xxxx.xxxx.xxxx:1521:orcl"/> </fields> <!-- 图片服务器 --> <fields BG_PROPERTY_VALUE_ID="62"> <field VALUE = "http://xxxx.xxxx.xxxx.xxxx:40018/"/> </fields> <!-- 域名 --> <fields BG_PROPERTY_VALUE_ID="64"> <field VALUE = "http://192.168.0.104:8081/dfs/ws/imgSys"/> </fields> <!-- 图片服务器 --> <fields BG_PROPERTY_VALUE_ID="65"> <field VALUE = "http://xxxx.xxxx.xxxx.xxxx:40018/"/> </fields> <!-- 业务自助管理自定义系统URL --> <fields BG_PROPERTY_VALUE_ID="69"> <field VALUE = "jdbc:oracle:thin:@xxxx.xxxx.xxxx.xxxx:1521:orcl"/> </fields> <!-- LOG数据库url --> <fields BG_PROPERTY_VALUE_ID="32"> <field VALUE = "jdbc:oracle:thin:@xxxx.xxxx.xxxx.xxxx:1521:orc