Q
qdlover
Unregistered / Unconfirmed
GUEST, unregistred user!
我需要读出每个topic的name,cn,跟以下的sql里面的内容
因为只是为了做个接口,没空研究xml根式跟XMLDocument控件的用法了,请高手直接给出代码吧,多谢了,在线等。
<?xml version="1.0" encoding="GBK"?>
<conf>
<topic name="KSCDYDY" cn="8.1.2.5 综合电压合格率(DY)">
<sql>
select
col_1_1_3_134 as KSCDYDY01,
'200704' as KSCDYDY02,
col_1_1_3_246 as KSCDYDY03,
col_1_1_3_248 as KSCDYDY04,
col_1_1_3_250 as KSCDYDY05,
col_1_1_3_252 as KSCDYDY06,
col_1_1_3_245 as KSCDYDY07,
col_1_1_3_255 as KSCDYDY08,
col_1_1_3_257 as KSCDYDY09,
col_1_1_3_259 as KSCDYDY10,
col_1_1_3_261 as KSCDYDY11,
col_1_1_3_254 as KSCDYDY12,
col_1_1_3_247 as KSCDYDY13,
col_1_1_3_249 as KSCDYDY14,
col_1_1_3_251 as KSCDYDY15,
col_1_1_3_253 as KSCDYDY16,
col_1_1_3_256 as KSCDYDY17,
col_1_1_3_258 as KSCDYDY18,
col_1_1_3_260 as KSCDYDY19,
col_1_1_3_262 as KSCDYDY20
from 南方电网静态表 s,南方电网动态表 d where s.col_1_1_3_1=d.col_1_1_3_1 and d.it_state='ITSTATE'
and col_1_1_3_134 is not null and col_1_1_3_246 is not null
</sql>
</topic>
<topic name="KSCSCSC" cn="全省用电情况(SC)">
<sql>
select
col_1_1_3_134 as KSCSCSC01,
'200705' as KSCSCSC02,
col_1_1_3_284 as KSCSCSC05,
col_1_1_3_288 as KSCSCSC07,
col_1_1_3_292 as KSCSCSC08,
col_1_1_3_296 as KSCSCSC09,
col_1_1_3_300 as KSCSCSC03,
col_1_1_3_304 as KSCSCSC06,
col_1_1_3_308 as KSCSCSC04,
col_1_1_3_351 as KSCSCSC10,
col_1_1_3_355 as KSCSCSC11,
col_1_1_3_367 as KSCSCSC12,
col_1_1_3_371 as KSCSCSC13,
col_1_1_3_375 as KSCSCSC14,
col_1_1_3_379 as KSCSCSC15,
col_1_1_3_474 as KSCSCSC16
from 南方电网静态表 s,南方电网动态表 d where s.col_1_1_3_1=d.col_1_1_3_1 and d.it_state='ITSTATE'
and col_1_1_3_134 is not null
</sql>
</topic>
<topic name="KSCZGZG" cn="供电综合情况">
<sql>
select
col_1_1_3_134 as KSCZGZG01,
'200704' as KSCZGZG02,
col_1_1_3_2041 as KSCZGZG03,
col_1_1_3_280 as KSCZGZG04,
col_1_1_3_2033 as KSCZGZG05,
col_1_1_3_2029 as KSCZGZG06,
col_1_1_3_2030 as KSCZGZG07,
col_1_1_3_2031 as KSCZGZG08,
col_1_1_3_2032 as KSCZGZG09,
col_1_1_3_2039 as KSCZGZG10,
col_1_1_3_2040 as KSCZGZG11,
col_1_1_3_355 as KSCZGZG12,
col_1_1_3_2035 as KSCZGZG13,
'0' as KSCZGZG14,
col_1_1_3_359 as KSCZGZG15,
col_1_1_3_363 as KSCZGZG16
from 南方电网静态表 s,南方电网动态表 d where s.col_1_1_3_1=d.col_1_1_3_1 and d.it_state='ITSTATE'
and col_1_1_3_134 is not null
</sql>
</topic>
<topic name="KSCDCDC" cn="电厂生产情况">
<sql>
select
col_1_1_6_2096 as KSCDCDC01,
'200704' as KSCDCDC02,
col_1_1_6_478 as KSCDCDC03,
col_1_1_6_479 as KSCDCDC04,
col_1_1_6_342 as KSCDCDC05,
col_1_1_6_479 as KSCDCDC06,
col_1_1_6_523 as KSCDCDC07,
col_1_1_6_547 as KSCDCDC08,
col_1_1_6_527 as KSCDCDC09,
col_1_1_6_543 as KSCDCDC10,
col_1_1_6_683 as KSCDCDC11,
col_1_1_6_714 as KSCDCDC12,
col_1_1_6_486 as KSCDCDC13,
col_1_1_6_487 as KSCDCDC14,
col_1_1_6_528 as KSCDCDC15,
col_1_1_6_542 as KSCDCDC16,
col_1_1_6_525 as KSCDCDC17,
col_1_1_6_545 as KSCDCDC18,
col_1_1_6_526 as KSCDCDC19,
col_1_1_6_544 as KSCDCDC20,
col_1_1_6_682 as KSCDCDC21,
col_1_1_6_713 as KSCDCDC22
from 电力生产静态表 s,电力生产动态表 d where s.col_1_1_6_1=d.col_1_1_6_1 and d.it_state='ITSTATE'
and col_1_1_6_2096 is not null
</sql>
</topic>
<topic name="KSCHYHY" cn="行业用电分类">
<sql>
select
col_1_1_7_2001 as KSCHYHY01,
'200704' as KSCHYHY02,
col_1_1_7_4 as KSCHYHY03,
col_1_1_7_5 as KSCHYHY04,
col_1_1_7_10 as KSCHYHY05,
col_1_1_7_11 as KSCHYHY06
from 用电分类静态表 s,用电分类动态表 d where s.col_1_1_7_1=d.col_1_1_7_1 and d.it_state='ITSTATE'
and col_1_1_7_2001 is not null
</sql>
</topic>
</conf>
因为只是为了做个接口,没空研究xml根式跟XMLDocument控件的用法了,请高手直接给出代码吧,多谢了,在线等。
<?xml version="1.0" encoding="GBK"?>
<conf>
<topic name="KSCDYDY" cn="8.1.2.5 综合电压合格率(DY)">
<sql>
select
col_1_1_3_134 as KSCDYDY01,
'200704' as KSCDYDY02,
col_1_1_3_246 as KSCDYDY03,
col_1_1_3_248 as KSCDYDY04,
col_1_1_3_250 as KSCDYDY05,
col_1_1_3_252 as KSCDYDY06,
col_1_1_3_245 as KSCDYDY07,
col_1_1_3_255 as KSCDYDY08,
col_1_1_3_257 as KSCDYDY09,
col_1_1_3_259 as KSCDYDY10,
col_1_1_3_261 as KSCDYDY11,
col_1_1_3_254 as KSCDYDY12,
col_1_1_3_247 as KSCDYDY13,
col_1_1_3_249 as KSCDYDY14,
col_1_1_3_251 as KSCDYDY15,
col_1_1_3_253 as KSCDYDY16,
col_1_1_3_256 as KSCDYDY17,
col_1_1_3_258 as KSCDYDY18,
col_1_1_3_260 as KSCDYDY19,
col_1_1_3_262 as KSCDYDY20
from 南方电网静态表 s,南方电网动态表 d where s.col_1_1_3_1=d.col_1_1_3_1 and d.it_state='ITSTATE'
and col_1_1_3_134 is not null and col_1_1_3_246 is not null
</sql>
</topic>
<topic name="KSCSCSC" cn="全省用电情况(SC)">
<sql>
select
col_1_1_3_134 as KSCSCSC01,
'200705' as KSCSCSC02,
col_1_1_3_284 as KSCSCSC05,
col_1_1_3_288 as KSCSCSC07,
col_1_1_3_292 as KSCSCSC08,
col_1_1_3_296 as KSCSCSC09,
col_1_1_3_300 as KSCSCSC03,
col_1_1_3_304 as KSCSCSC06,
col_1_1_3_308 as KSCSCSC04,
col_1_1_3_351 as KSCSCSC10,
col_1_1_3_355 as KSCSCSC11,
col_1_1_3_367 as KSCSCSC12,
col_1_1_3_371 as KSCSCSC13,
col_1_1_3_375 as KSCSCSC14,
col_1_1_3_379 as KSCSCSC15,
col_1_1_3_474 as KSCSCSC16
from 南方电网静态表 s,南方电网动态表 d where s.col_1_1_3_1=d.col_1_1_3_1 and d.it_state='ITSTATE'
and col_1_1_3_134 is not null
</sql>
</topic>
<topic name="KSCZGZG" cn="供电综合情况">
<sql>
select
col_1_1_3_134 as KSCZGZG01,
'200704' as KSCZGZG02,
col_1_1_3_2041 as KSCZGZG03,
col_1_1_3_280 as KSCZGZG04,
col_1_1_3_2033 as KSCZGZG05,
col_1_1_3_2029 as KSCZGZG06,
col_1_1_3_2030 as KSCZGZG07,
col_1_1_3_2031 as KSCZGZG08,
col_1_1_3_2032 as KSCZGZG09,
col_1_1_3_2039 as KSCZGZG10,
col_1_1_3_2040 as KSCZGZG11,
col_1_1_3_355 as KSCZGZG12,
col_1_1_3_2035 as KSCZGZG13,
'0' as KSCZGZG14,
col_1_1_3_359 as KSCZGZG15,
col_1_1_3_363 as KSCZGZG16
from 南方电网静态表 s,南方电网动态表 d where s.col_1_1_3_1=d.col_1_1_3_1 and d.it_state='ITSTATE'
and col_1_1_3_134 is not null
</sql>
</topic>
<topic name="KSCDCDC" cn="电厂生产情况">
<sql>
select
col_1_1_6_2096 as KSCDCDC01,
'200704' as KSCDCDC02,
col_1_1_6_478 as KSCDCDC03,
col_1_1_6_479 as KSCDCDC04,
col_1_1_6_342 as KSCDCDC05,
col_1_1_6_479 as KSCDCDC06,
col_1_1_6_523 as KSCDCDC07,
col_1_1_6_547 as KSCDCDC08,
col_1_1_6_527 as KSCDCDC09,
col_1_1_6_543 as KSCDCDC10,
col_1_1_6_683 as KSCDCDC11,
col_1_1_6_714 as KSCDCDC12,
col_1_1_6_486 as KSCDCDC13,
col_1_1_6_487 as KSCDCDC14,
col_1_1_6_528 as KSCDCDC15,
col_1_1_6_542 as KSCDCDC16,
col_1_1_6_525 as KSCDCDC17,
col_1_1_6_545 as KSCDCDC18,
col_1_1_6_526 as KSCDCDC19,
col_1_1_6_544 as KSCDCDC20,
col_1_1_6_682 as KSCDCDC21,
col_1_1_6_713 as KSCDCDC22
from 电力生产静态表 s,电力生产动态表 d where s.col_1_1_6_1=d.col_1_1_6_1 and d.it_state='ITSTATE'
and col_1_1_6_2096 is not null
</sql>
</topic>
<topic name="KSCHYHY" cn="行业用电分类">
<sql>
select
col_1_1_7_2001 as KSCHYHY01,
'200704' as KSCHYHY02,
col_1_1_7_4 as KSCHYHY03,
col_1_1_7_5 as KSCHYHY04,
col_1_1_7_10 as KSCHYHY05,
col_1_1_7_11 as KSCHYHY06
from 用电分类静态表 s,用电分类动态表 d where s.col_1_1_7_1=d.col_1_1_7_1 and d.it_state='ITSTATE'
and col_1_1_7_2001 is not null
</sql>
</topic>
</conf>