比如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>