xml CDATA区、特殊字符:= 大于等于

XML文档中包含类似"Elements look like <this>"的文本,其中的"<this>"将被解析程序解释成一个元素,而人们实际想要的是"<this>"所表示的原义文本。

1.CDATA区:它的全称为character data,以"<![CDATA[ "开始,以" ]]>" 结束,在两者之间嵌入不想被解析程序解析的原始数据,解析器不对CDATA区中的内容进行解析,而是

将这些数据原封不动地交给下游程序处理。

2.特殊字符 :

xml 中表示:   <= 小于等于、    >= 大于等于 需加  这样的标记:     <![CDATA[   ]]>      xml中有&的符号,需要<![CDATA[&]]>这样表示&

 

<= 小于等于 :<![CDATA[   <=  ]]>

 

 

>= 大于等于:<![CDATA[  >=  ]]>

一些特殊字符也可用下面的替代符号所代替。

 特殊字符   替代符号

     &            &amp;

     <            &lt;

     >            &gt;

     "             &quot;

     '              &apos;

 

eg.

<!--  钻井日报使用sql   -->
    <entry key="zjDailydrillrepCnQuery">
     <map>
      <entry key="sql">
       <value>
         select zjDailydrillrep.dailydrilrepid,
                       zjDailydrillrep.wellbore_id,
                       bore.well_legal_name,
                       zjDailydrillrep.spudin_date,
                       zjDailydrillrep.reportfor,
                       zjDailydrillrep.depthmkb,
                       zjDailydrillrep.tvdmkb,
                       zjDailydrillrep.format_id,
                       zjDailydrillrep.enginbrief,
                       zjDailydrillrep.Dailywellcost,
                       zjDailydrillrep.insert_date,
                       zjDailydrillrep.status,
                       zjDailydrillrep.comments,
                       zjDailydrillrep.Submitter,
                       zjDailydrillrep.Verifyer,
                       rig.rig_no,
                       zjDailydrillrep.Rothours,
                       (select GEO.CURRENT_TD
                          from LJ_DAILY_GEOLOGICAL_REPORT GEO
                         where zjDailydrillrep.WELLBORE_ID = GEO.WELLBORE_ID
                           and GEO.REPORT_DATE = zjDailydrillrep.REPORTFOR
                           and geo.half_full = '260002' and rownum<![CDATA[<=1 ]]> ) td,    --------表示rownum <=1
                      
                       (select GEO.CURRENT_TD
                          from LJ_DAILY_GEOLOGICAL_REPORT GEO
                         where zjDailydrillrep.WELLBORE_ID = GEO.WELLBORE_ID
                           and GEO.REPORT_DATE = zjDailydrillrep.REPORTFOR - 1
                           and geo.half_full = '260002'  and rownum<![CDATA[<=1 ]]> ) tdbefore
                  from zj_Dailydrillrep zjDailydrillrep
                  left join COMM_WELLBORE BORE
                    on bore.wellbore_id = zjDailydrillrep.wellbore_id
                  left join zj_rig_data rig
                    on rig.rig_id = bore.rig_id
                 where 1 = 1

       </value>
      </entry>
     </map>
    </entry>

没有更多推荐了,返回首页