函数名:f_split_xml
参数 :
string as_source
string as_split
ref string as_ret[]
返回值:long ll_count
Long ll_count
Long ll_pos_h,ll_pos_e
String ls_xml
String ls_xml_b,ls_xml_e
String ls_value
ls_xml = as_source
ls_xml_b = '<'+as_split+'>'
ls_xml_e = '</'+as_split+'>'
ll_pos_h = PosA(ls_xml,ls_xml_b,1)
ll_pos_e = PosA(ls_xml,ls_xml_e,1)
ll_count = 0
Do While ll_pos_h > 0
ll_count ++
ls_value = ''
ls_value = MidA(ls_xml,ll_pos_h + LenA(ls_xml_b) ,ll_pos_e - ll_pos_h - LenA(ls_xml_b))
If Isnull(ls_value) Then ls_value = ''
as_ret[ll_count] = ls_value
ls_xml = MidA(ls_xml,ll_pos_e + LenA(ls_xml_e))
ll_pos_h = PosA(ls_xml,ls_xml_b,1)
ll_pos_e = PosA(ls_xml,ls_xml_e,1)
Loop
If ll_count <= 0 Then as_ret[1] = '-1'
Return ll_count