[求助]ORACLE数据导出为XML格式
java如何实现将数据库的数据导出为
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<DATAPACKET Version="2.0">
<METADATA>
<FIELDS>
<FIELD attrname="PERID" fieldtype="fixedFMT" WIDTH="22" />
<FIELD attrname="PERNO" fieldtype="string" WIDTH="20" />
<FIELD attrname="PERNAME" fieldtype="string" WIDTH="20" />
<FIELD attrname="PASSWORD" fieldtype="string" WIDTH="50" />
<FIELD attrname="DEPTID" fieldtype="fixedFMT" WIDTH="22" />
<FIELD attrname="SEX" fieldtype="string" SUBTYPE="FixedChar" WIDTH="1" />
<FIELD attrname="DEPTNO" fieldtype="string" WIDTH="20" />
<FIELD attrname="DEPTNAME" fieldtype="string" WIDTH="40" />
</FIELDS>
<PARAMS DEFAULT_ORDER="2" LCID="0" />
</METADATA>
<ROWDATA>
<ROW PERID="1" PERNO="0001" PERNAME="戴志存" PASSWORD="35363730" DEPTID="1" SEX="0" DEPTNO="01" DEPTNAME="系统管理组" />
<ROW PERID="2" PERNO="0002" PERNAME="陈庆炜" DEPTID="1" SEX="0" DEPTNO="01" DEPTNAME="系统管理组" />
<ROW PERID="3" PERNO="0003" PERNAME="薛红涛" DEPTID="1" SEX="0" DEPTNO="01" DEPTNAME="系统管理组" />
<ROW PERID="6" PERNO="0004" PERNAME="彭海波" DEPTID="1" SEX="0" DEPTNO="01" DEPTNAME="系统管理组" />
<ROW PERID="4" PERNO="0005" PERNAME="马璐" DEPTID="2" SEX="1" DEPTNO="02" DEPTNAME="入库验收组" />
<ROW PERID="5" PERNO="0006" PERNAME="冯萍" DEPTID="2" SEX="1" DEPTNO="02" DEPTNAME="入库验收组" />
<ROW PERID="7" PERNO="0007" PERNAME="张婕" DEPTID="3" SEX="2" DEPTNO="03" DEPTNAME="出库组" />
</ROWDATA>
</DATAPACKET>
格式