0

这是我的 XML 文件

<?xml version='1.0'  encoding='utf-8' ?>
<RESULTS>
    <ROW>
        <COLUMN NAME="DN"><![CDATA[PLMN-PLMN/RNC-14/WBTS-1/LCG-1]]></COLUMN>
        <COLUMN NAME="ROPTIME"><![CDATA[2013-05-15T07:00:00.000+07:00:00]]></COLUMN>
        <COLUMN NAME="MAX_AVAIL_CE"><![CDATA[432]]></COLUMN>
        <COLUMN NAME="MIN_AVAIL_CE"><![CDATA[432]]></COLUMN>
        <COLUMN NAME="AVG_AVAIL_CE"><![CDATA[432]]></COLUMN>
        <COLUMN NAME="MAX_USED_CE_DL"><![CDATA[33]]></COLUMN>
        <COLUMN NAME="MAX_USED_CE_UL"><![CDATA[15]]></COLUMN>
        <COLUMN NAME="RNC_2283A"><![CDATA[   7.64]]></COLUMN>
        <COLUMN NAME="RNC_2280A"><![CDATA[399]]></COLUMN>
        <COLUMN NAME="RNC_2277A"><![CDATA[   7.64]]></COLUMN>
        <COLUMN NAME="RNC_2278A"><![CDATA[   3.47]]></COLUMN>
        <COLUMN NAME="M5006C15"><![CDATA[720]]></COLUMN>
        <COLUMN NAME="M5006C16"><![CDATA[0]]></COLUMN>
        <COLUMN NAME="M5006C17"><![CDATA[0]]></COLUMN>
        <COLUMN NAME="M5006C18"><![CDATA[0]]></COLUMN>
        <COLUMN NAME="M5006C19"><![CDATA[0]]></COLUMN>
        <COLUMN NAME="M5006C20"><![CDATA[0]]></COLUMN>
        <COLUMN NAME="RNC_2253A"><![CDATA[ 100.00]]></COLUMN>
        <COLUMN NAME="RNC_2254A"><![CDATA[    .00]]></COLUMN>
        <COLUMN NAME="RNC_2255A"><![CDATA[    .00]]></COLUMN>
        <COLUMN NAME="RNC_2256A"><![CDATA[    .00]]></COLUMN>
        <COLUMN NAME="RNC_2257A"><![CDATA[    .00]]></COLUMN>
        <COLUMN NAME="RNC_2258A"><![CDATA[    .00]]></COLUMN>
    </ROW>
    <ROW>
        <COLUMN NAME="DN"><![CDATA[PLMN-PLMN/RNC-14/WBTS-10/LCG-1]]></COLUMN>
        <COLUMN NAME="ROPTIME"><![CDATA[2013-05-15T07:00:00.000+07:00:00]]></COLUMN>
        <COLUMN NAME="MAX_AVAIL_CE"><![CDATA[324]]></COLUMN>
        <COLUMN NAME="MIN_AVAIL_CE"><![CDATA[324]]></COLUMN>
        <COLUMN NAME="AVG_AVAIL_CE"><![CDATA[324]]></COLUMN>
        <COLUMN NAME="MAX_USED_CE_DL"><![CDATA[35]]></COLUMN>
        <COLUMN NAME="MAX_USED_CE_UL"><![CDATA[11]]></COLUMN>
        <COLUMN NAME="RNC_2283A"><![CDATA[  10.80]]></COLUMN>
        <COLUMN NAME="RNC_2280A"><![CDATA[289]]></COLUMN>
        <COLUMN NAME="RNC_2277A"><![CDATA[  10.80]]></COLUMN>
        <COLUMN NAME="RNC_2278A"><![CDATA[   3.40]]></COLUMN>
        <COLUMN NAME="M5006C15"><![CDATA[721]]></COLUMN>
        <COLUMN NAME="M5006C16"><![CDATA[0]]></COLUMN>
        <COLUMN NAME="M5006C17"><![CDATA[0]]></COLUMN>
        <COLUMN NAME="M5006C18"><![CDATA[0]]></COLUMN>
        <COLUMN NAME="M5006C19"><![CDATA[0]]></COLUMN>
        <COLUMN NAME="M5006C20"><![CDATA[0]]></COLUMN>
        <COLUMN NAME="RNC_2253A"><![CDATA[ 100.00]]></COLUMN>
        <COLUMN NAME="RNC_2254A"><![CDATA[    .00]]></COLUMN>
        <COLUMN NAME="RNC_2255A"><![CDATA[    .00]]></COLUMN>
        <COLUMN NAME="RNC_2256A"><![CDATA[    .00]]></COLUMN>
        <COLUMN NAME="RNC_2257A"><![CDATA[    .00]]></COLUMN>
        <COLUMN NAME="RNC_2258A"><![CDATA[    .00]]></COLUMN>
    </ROW>
</RESULTS>

我只想获取@NAME='DN'DN 的数据和值'PLMN-PLMN/RNC-14/WBTS-1/LCG-1'。之后我得到数据@NAME='MAX_AVAIL_CE'来计算和导出报告。那么我该怎么做呢?

4

1 回答 1

0

此查询将返回COLUMNS名称MAX_AVAIL_CE为 a的所有内容,ROW其中包含以指定值命名的列DN

//ROW[COLUMN[@NAME='DN'] = 'PLMN-PLMN/RNC-14/WBTS-1/LCG-1']/COLUMN[@NAME='MAX_AVAIL_CE']
于 2013-06-18T04:47:06.247 回答