Do XML parsers translate escaped characters such as 
 and 
 even when they occur in CDATA? 
I was confused by the answer to this question: Does the XML specification states that parser need to convert \n\r to \n always, even when \n\r appears in a CDATA section?
...because it quotes from the spec saying that sequences like #xD #xA are replaced with a single '\n' character, but then goes on to say that using 
 and 
 is a reliable way to preserve the characters. Is the semi-colon significant? (I don't have time to study the XML spec)
Also, I am aware that the 2 characters above are carriage return and开发者_开发百科 line feed, and that they are normalized to just line feed by XML parsers - if the rules for what happens inside CDATA for line breaks is different to escaped sequences in general, then I hereby ask both questions!
Thanks, rp
Nope. The parser does not touch anything in a CDATA section.
The semicolon does not make a difference.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论