51Testing软件测试论坛
标题:
怎么从返回的xml文件中,有选择的取出部分数据保存后做关联
[打印本页]
作者:
jse1022
时间:
2009-10-29 17:30
标题:
怎么从返回的xml文件中,有选择的取出部分数据保存后做关联
服务器返回的信息在tree view中显示如下:
<?xml version="1.0" encoding="utf-8"?>
<root>
<html>
<![CDATA[ <table bordercolor=DimGray border=1 class=dbnetgrid
id=dbNetGridTable><colgroup id=dgcolgroup><col style='' ><col style='' ><col
style='' ><col style='' ><col style='text-align:right;' ><col style='' ><col
style='text-align:center;' ><col style='text-align:center;' ><col style='' ><col
style='' ><col style='display:none;' ></colgroup><tr class=dbnetgridheading><td
class=dbnetgridheading size="20" col="SJ_TYPE" dataType="VARCHAR2"></td><td
class=dbnetgridheading size="100" col="COMPLETE_ID" dataType="VARCHAR2"></td><td
class=dbnetgridheading size="1" col="('2')" dataType="CHAR"></td><td
class=dbnetgridheading size="1" col="('0')" dataType="CHAR"></td><td
class=dbnetgridheading size="22" col="BILL_STATE" dataType="NUMBER"></td><td
class=dbnetgridheading size="20" col="STATE" dataType="VARCHAR2"></td><td
class=dbnetgridheading size="7" col="END_DATE" dataType="DATE"></td><td
class=dbnetgridheading size="7" col="REPORT_DATE" dataType="DATE"></td><td
class=dbnetgridheading size="1" col="('1')" dataType="CHAR"></td><td
class=dbnetgridheading size="1" col="('3')" dataType="CHAR"></td><td
class=dbnetgridheading size="2000" col="MEMO" dataType="VARCHAR2"></td></tr><tr
class=dbnetgrid id="1600002" complete_id="1600002" bill_state="1" state="0"
unit_id="50101000000000" sj_type="201003" report_date="" memo="" end_date=""
title="2006骞?1鏈堥儜宸炰緵鐢靛叕鍙哥患鍚堣鍒掓墽琛屾儏鍐? doc_state="0"
doc_bill_state="0" ><td class=dbnetgrid>201003</td><td
class=dbnetgrid>1600002</td><td class=dbnetgrid>2</td><td
class=dbnetgrid>0</td><td class=dbnetgrid><nobr>1</td><td
class=dbnetgrid>0</td><td class=dbnetgrid><nobr></td><td
class=dbnetgrid><nobr></td><td class=dbnetgrid>1</td><td
class=dbnetgrid>3</td><td class=dbnetgrid></td></tr><tr class=dbnetgrid
id="501010000000002009081249527566750"
complete_id="501010000000002009081249527566750" bill_state="0" state="0"
unit_id="50101000000000" sj_type="200911" report_date="" memo="" end_date=""
title="2009骞?1鏈堥儜宸炰緵鐢靛叕鍙哥患鍚堣鍒掓墽琛屾儏鍐? doc_state="0"
doc_bill_state="0" ><td class=dbnetgrid>200911</td><td
class=dbnetgrid>501010000000002009081249527566750</td><td
class=dbnetgrid>2</td><td class=dbnetgrid>0</td><td
class=dbnetgrid><nobr>0</td><td class=dbnetgrid>0</td><td
class=dbnetgrid><nobr></td><td class=dbnetgrid><nobr></td><td
class=dbnetgrid>1</td><td class=dbnetgrid>3</td><td
class=dbnetgrid></td></tr><tr class=dbnetgrid
id="501010000000002009071248846585968"
complete_id="501010000000002009071248846585968" bill_state="0" state="0"
unit_id="50101000000000" sj_type="200910" report_date="" memo="" end_date=""
title="2009骞?0鏈堥儜宸炰緵鐢靛叕鍙哥患鍚堣鍒掓墽琛屾儏鍐? doc_state="0"
doc_bill_state="0" ><td class=dbnetgrid>200910</td><td
class=dbnetgrid>501010000000002009071248846585968</td><td
class=dbnetgrid>2</td><td class=dbnetgrid>0</td><td
class=dbnetgrid><nobr>0</td><td class=dbnetgrid>0</td><td
class=dbnetgrid><nobr></td><td class=dbnetgrid><nobr></td><td
class=dbnetgrid>1</td><td class=dbnetgrid>3</td><td
class=dbnetgrid></td></tr><tr class=dbnetgrid
id="501010000000002009081249611489484"
complete_id="501010000000002009081249611489484" bill_state="0" state="0"
unit_id="50101000000000" sj_type="200908" report_date="" memo="123123"
end_date="" title="2009骞?8鏈堥儜宸炰緵鐢靛叕鍙哥患鍚堣鍒掓墽琛屾儏鍐?
doc_state="0" doc_bill_state="0" ><td class=dbnetgrid>200908</td><td
class=dbnetgrid>501010000000002009081249611489484</td><td
class=dbnetgrid>2</td><td class=dbnetgrid
请问如何能够取出其中bill_state="0"记录的complete_id?(如上面红色标志部门信息中的complete_id)
作者:
云层
时间:
2009-10-29 17:58
用一个函数lr_get_xml_value()希望我没记错
作者:
jse1022
时间:
2009-10-29 18:06
谢谢楼上的回复。lr_xml_get_value()是取xml标签中的数据。可是怎么让他像sql语句一样可以筛选,同时取标签中的部分数据呢?
作者:
jse1022
时间:
2009-10-30 09:53
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2