Converting XML to escaped text in XSLT

前端 未结 8 1683
挽巷
挽巷 2020-12-03 02:54

How can I convert the following XML to an escaped text using XSLT?

Source:



  

        
8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-03 03:43

    instead of escaping you can add the text inside a CDATA section. Text inside a CDATA section will be ignored by the parser, similar to if it was escaped.

    your example would look like this

    
    
      
        mnop
      
    
    ]]>
    
    

    using following XSLT snippet:

    <![CDATA[
     
     ]]
     >
    

提交回复
热议问题