1.oracle数据库xml文件,blob字段
<?xml version="1.0" encoding="UTF-8"?>
<htmlobject> <unit> <NAME>levelBoolean</NAME> <VALUE></VALUE> </unit> <unit> <NAME>submitTime</NAME> <VALUE>2013-05-06</VALUE> </unit> <unit> <NAME>jzwf_httpcontext</NAME> <VALUE>/officialdoc</VALUE> </unit> <unit> <NAME>upperdepid</NAME> <VALUE>100183</VALUE> </unit> <unit> <NAME>reportusername</NAME> <VALUE>管理员</VALUE> </unit> <unit> <NAME>koof_attachreadonly</NAME> <VALUE></VALUE> </unit> <unit> <NAME>otherRoom</NAME> <VALUE>false</VALUE> </unit> <unit> <NAME>lrldyj</NAME> <VALUE>false</VALUE> </unit> <unit> <NAME>koof_isshowsearch</NAME> <VALUE></VALUE> </unit> <unit> <NAME>koof_relatedprocesses_canadd</NAME> <VALUE></VALUE> </unit> <unit> <NAME>tel</NAME> <VALUE>12345678901</VALUE> </unit> <unit> <NAME>sysDate</NAME> <VALUE>2013-05-06</VALUE> </unit> <unit> <NAME>jzwf_userdrivervaluelist</NAME> <VALUE></VALUE> </unit> <unit> <NAME>jzwf_submitactiondisplayname</NAME> <VALUE>是的</VALUE> </unit> <unit> <NAME>transctLimit</NAME> </unit> <unit> <NAME>jzwf_isformvalidate</NAME> <VALUE>1</VALUE> </unit> <unit> <NAME>filenumid</NAME> <VALUE></VALUE> </unit> <unit> <NAME>cctvTvStationIDs</NAME> <VALUE></VALUE> </unit> <unit> <NAME>jzwf_httpport</NAME> <VALUE>9080</VALUE> </unit> <unit> <NAME>chulingdao</NAME> <VALUE>8a81a3fd3df6e29d013df84617a60055</VALUE> </unit> <unit> <NAME>formState</NAME> <VALUE></VALUE> </unit> <unit> <NAME>isBack</NAME> <VALUE>true</VALUE> </unit> <unit> <NAME>opinions</NAME> </unit> <unit> <NAME>applyUserID</NAME> <VALUE>8a81a68c3c041ffe013c0ee98c290010</VALUE> </unit> <unit> <NAME>koof_requiredtypes</NAME> <VALUE></VALUE> </unit> <unit> <NAME>documentvalue</NAME> <VALUE></VALUE> </unit> <unit> <NAME>isSupervise</NAME> <VALUE></VALUE> </unit> <unit> <NAME>attachmentGroupID</NAME> <VALUE>8aef00a33e78bae1013e78e5c96c0024</VALUE> </unit> <unit> <NAME>upperdepname</NAME> <VALUE>速度</VALUE> </unit> <unit> <NAME>supervisecontent</NAME> </unit> <unit> <NAME>iszhbbutton</NAME> <VALUE></VALUE> </unit> <unit> <NAME>iftheleader</NAME> <VALUE>false</VALUE> </unit> <unit> <NAME>zhinengbumenmishu</NAME> <VALUE></VALUE> </unit> <unit> <NAME>isShowchulingdaoOpinion</NAME> <VALUE></VALUE> </unit> <unit> <NAME>koof_attachgroup</NAME> <VALUE>8aef00a33e78bae1013e78e5c96c0024</VALUE> </unit> <unit> <NAME>title</NAME> <VALUE>娴嬭瘯2013骞?鏈?鏃?16:23:59</VALUE> </unit> <unit> <NAME>jzwf_processname</NAME> <VALUE>十大神兽</VALUE> </unit> <unit> <NAME>applyTime</NAME> <VALUE>2013-05-06</VALUE> </unit> <unit> <NAME>superviseID</NAME> <VALUE></VALUE> </unit> <unit> <NAME>feedbackopinion</NAME> </unit> <unit> <NAME>jzwf_tasktype</NAME> <VALUE>3</VALUE> </unit> <unit> <NAME>officialDocIndexID</NAME> <VALUE>8aef00a33e78ba0b013e78e64fc3001e</VALUE> </unit> <unit> <NAME>applyuserdepsigncode</NAME> <VALUE>xiangmuguanlibu</VALUE> </unit> <unit> <NAME>centerIssued</NAME> <VALUE>false</VALUE> </unit> <unit> <NAME>applyusercenterid</NAME> <VALUE></VALUE> </unit> <unit> <NAME>jzwf_formname</NAME> <VALUE>是是是</VALUE> </unit> <unit> <NAME>owerid</NAME> <VALUE></VALUE> </unit> <unit> <NAME>isnotice_temp</NAME> <VALUE>on</VALUE> </unit> <unit> <NAME>isDbLeader</NAME> <VALUE></VALUE> </unit> <unit> <NAME>nextforward</NAME> <VALUE></VALUE> </unit> <unit> <NAME>zonghebuzhuren</NAME> <VALUE>zongheyewubu</VALUE> </unit> <unit> <NAME>isDelete</NAME> <VALUE>0</VALUE> </unit> <unit> <NAME>documentid</NAME> <VALUE></VALUE> </unit> <unit> <NAME>superviselimit</NAME> </unit> <unit> <NAME>jzwf_userdrivernamelist</NAME> <VALUE></VALUE> </unit> <unit> <NAME>superContent</NAME> </unit> <unit> <NAME>supervisezx</NAME> </unit> <unit> <NAME>wfinstanceID</NAME> <VALUE>8aef00a33e78ba0b013e78e6891a001f</VALUE> </unit> <unit> <NAME>jzwf_taskid</NAME> <VALUE>3</VALUE> </unit> <unit> <NAME>koof_contentbeanid</NAME> <VALUE></VALUE> </unit> <unit> <NAME>remark</NAME> <VALUE>士大夫似的</VALUE> </unit> <unit> <NAME>isnotice</NAME> <VALUE>1</VALUE> </unit> <unit> <NAME>gezhongxinmishu</NAME> <VALUE></VALUE> </unit> <unit> <NAME>koof_relatedprocesses_candel</NAME> <VALUE></VALUE> </unit> <unit> <NAME>applyUserName</NAME> <VALUE>胜多负少地址</VALUE> </unit> <unit> <NAME>filenum</NAME> <VALUE>1士大夫似的</VALUE> </unit> <unit> <NAME>postcode</NAME> <VALUE>chulingdao</VALUE> </unit> <unit> <NAME>jzwf_instanceid</NAME> <VALUE></VALUE> </unit> <unit> <NAME>cctvTvStation</NAME> <VALUE></VALUE> <VALUE></VALUE> </unit> <unit> <NAME>openworkitemmode</NAME> <VALUE></VALUE> </unit> <unit> <NAME>imagefoldername</NAME> <VALUE>silvercherry</VALUE> </unit> <unit> <NAME>jzwf_attachmenttempdir</NAME> <VALUE>8aef00a33e78bae1013e78e5cc170025</VALUE> </unit> <unit> <NAME>cctvTvStationNames</NAME> <VALUE></VALUE> </unit> <unit> <NAME>processName</NAME> <VALUE>胜多负少</VALUE> </unit> <unit> <NAME>cctvTvStationNames2</NAME> <VALUE></VALUE> </unit> <unit> <NAME>importAntDoc_temp</NAME> </unit> <unit> <NAME>koof_iscustom</NAME> <VALUE></VALUE> </unit> <unit> <NAME>zhongxinmishu</NAME> <VALUE>jieguanban</VALUE> </unit> <unit> <NAME>formApplyID</NAME> <VALUE>8aef00a33e78ba0b013e78e68add0022</VALUE> </unit> <unit> <NAME>koofpvmaincontentnum</NAME> <VALUE>8aef00a33e78ba0b013e78e64fc3001e</VALUE> </unit> <unit> <NAME>jzwf_processid</NAME> <VALUE>10101</VALUE> </unit> <unit> <NAME>jzwf_taskname</NAME> <VALUE>Task_3</VALUE> </unit> <unit> <NAME>zhongxinmishu2</NAME> <VALUE></VALUE> </unit> <unit> <NAME>queryProcessName</NAME> <VALUE>胜多负少</VALUE> </unit> <unit> <NAME>daziyuan</NAME> <VALUE></VALUE> </unit> <unit> <NAME>isShowSupervise</NAME> <VALUE></VALUE> </unit> <unit> <NAME>supervisefile</NAME> </unit> <unit> <NAME>centercode</NAME> <VALUE>jieguanban</VALUE> </unit> <unit> <NAME>pindaofuzongjian</NAME> <VALUE></VALUE> </unit> <unit> <NAME>koofpvsyncount</NAME> <VALUE></VALUE> </unit> <unit> <NAME>supervisefdtime</NAME> </unit> <unit> <NAME>gechumishu</NAME> <VALUE></VALUE> </unit> <unit> <NAME>filesytlename</NAME> <VALUE>1</VALUE> </unit> <unit> <NAME>importAntDoc</NAME> <VALUE></VALUE> </unit> <unit> <NAME>zhongxinzhuren</NAME> <VALUE></VALUE> </unit> <unit> <NAME>applyUserDeptID</NAME> <VALUE>100192</VALUE> </unit> <unit> <NAME>jzwf_submitactionflag</NAME> <VALUE>1</VALUE> </unit> <unit> <NAME>jzwf_userdrivername</NAME> <VALUE></VALUE> </unit> <unit> <NAME>jzwf_workitemid</NAME> <VALUE></VALUE> </unit> <unit> <NAME>jzwf_actionname</NAME> <VALUE></VALUE> </unit> <unit> <NAME>obj_signature_value</NAME> </unit> <unit> <NAME>applyUserDeptName</NAME> <VALUE>sdfsd</VALUE> </unit> <unit> <NAME>levelDept</NAME> <VALUE>buchumishu|||</VALUE> </unit> <unit> <NAME>jzwf_httpserver</NAME> <VALUE>10.111.128.35</VALUE> </unit> <unit> <NAME>koof_isreadonly</NAME> <VALUE></VALUE> </unit> <unit> <NAME>koof_viewtypes</NAME> <VALUE></VALUE> </unit> <unit> <NAME>chumishu</NAME> <VALUE></VALUE> </unit> <unit> <NAME>koofpvhascompose</NAME> <VALUE></VALUE> </unit> <unit> <NAME>jzwf_submitactionname</NAME> <VALUE>Action_4_showwindow</VALUE> </unit> <unit> <NAME>processCode</NAME> <VALUE>processOdInnerRecvfile</VALUE> </unit> <unit> <NAME>koof_relatedprocesses_selecttype</NAME> <VALUE></VALUE> </unit></htmlobject>
BaseDao dao = (BaseDao) InitializatedManager.getInstance()
.getApplicationContext().getBean("BaseDao");String hql = " from KoofWfWorkitemdata wd where wd.workitem.workitemid='"+ obj.toString() + "'";result = dao.getHibernateTemplate().find(hql);List<Unit> units = null;
String str = "";
if (result.size() > 0) {
KoofWfWorkitemdata kww = (KoofWfWorkitemdata) result.get(0);byte[] data = kww.getDatafiles();boolean countFlag = false;try {//dom解析过程
InputStream inputstream = new ByteArrayInputStream(data);DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();DocumentBuilder builder = factory.newDocumentBuilder();Document doc = (Document) builder.parse(inputstream);Element root = doc.getDocumentElement();NodeList poem = root.getChildNodes();for (int i = 0; i < poem.getLength(); i++) { Node node = poem.item(i);if (node.getNodeName().equals("unit")) { NodeList list = node.getChildNodes();for (int j = 0, size = list.getLength(); j < size; j++) { Node childNode = list.item(j);if (childNode.getNodeName().equals("NAME")) { String name = childNode.getFirstChild().getNodeValue();Node n1 = list.item(j + 2);if (name.equals("title")) { countFlag = true;str = n1.getTextContent();break;}}}}if (countFlag) { break;}}} catch (Exception e) { e.getMessage();}} else { str = "";}//dom解析过程结束