xml中sql的大於符號小於符號處理,xmlsql

來源:互聯網
上載者:User

xml中sql的大於符號小於符號處理,xmlsql

當我們需要通過xml格式處理sql語句時,經常會用到< ,<=,>,>=等符號,但是很容易引起xml格式的錯誤,這樣會導致後台將xml字串轉換為xml文檔時報錯,從而導致程式錯誤。

其實很簡單,我們只需作如下替換即可避免上述的錯誤:

原符號

  <

   <=

   >

   >=

    &

     '

      "

替換符號

&lt;

&lt;=

&gt;

&gt;=

&amp;

&apos;

&quot;

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.