XML有关键字无法识别怎么办?

990人阅读 评论(0) 收藏 举报
分类:

比如XML会视< 或 >为标记的开始结束,这时候就需要用<![CDATA[ xxxxxx ]]> 把你需要写入的结点内容括起来,如下

    <select id="PickUpCalUnit_LNGJTM" parameterClass="Hashtable">
      <![CDATA[
     SELECT  b.CalculatorUnitID ,
            b.BackupYear ,
            a.UnitID ,
            a.UnitName ,
            a.GeoID ,
            c.WorkID,
            c.CLLevelID
    FROM    dbo.T_Unit a
            INNER JOIN t_calculatorunit b ON a.unitid = b.unitid
            INNER JOIN T_LatestResult c ON a.UnitID = c.UnitID
    WHERE   a.UnitID IN (
            SELECT  UnitID
            FROM    T_LatestResult
            WHERE   WorkID = ( SELECT   MAX(a.WorkID) AS WorkID
                               FROM     T_LatestResult a
                                        JOIN T_Work b ON a.WorkID = b.WorkID
                                        JOIN DM_WorkStutas c ON b.StandardID = c.StandardID
                                                              AND b.WorkStutasID = c.WorkStutasID
                               WHERE    a.CLLevelID = 1
                                        AND b.StandardID = 1
                                        AND DATEPART(year, b.WorkYear) < $Year$
                             ) )
            AND c.WorkID = ( SELECT MAX(a.WorkID) AS WorkID
                             FROM   T_LatestResult a
                                    JOIN T_Work b ON a.WorkID = b.WorkID
                                    JOIN DM_WorkStutas c ON b.StandardID = c.StandardID
                                                            AND b.WorkStutasID = c.WorkStutasID
                             WHERE  a.CLLevelID = 1
                                    AND b.StandardID = 1
                                    AND DATEPART(year, b.WorkYear) < $Year$
                           ) 
      ]]>
    </select>


0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:4286588次
    • 积分:59068
    • 等级:
    • 排名:第44名
    • 原创:1195篇
    • 转载:573篇
    • 译文:7篇
    • 评论:1093条
    yes
    文章存档
    最新评论
    Asp.net