[Home] [By Thread] [By Date] [Recent Entries]

  • From: Roger L Costello <costello@m...>
  • To: "xml-dev@l..." <xml-dev@l...>
  • Date: Tue, 3 May 2022 12:28:10 +0000

After XML parsing is complete, every occurrence of &amp; will have been replaced by &

 

  1. True
  2. False

 

Scroll down to see the answer ……………

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

False! If the &amp; is within a CDATA section or within a comment, then it will be unchanged. Otherwise, it will be changed.

 

Lesson Learned: An XML lexer/parser must perform conditional processing:

 

IF (&amp; is within a CDATA section or comment) THEN

    OUTPUT(“&amp;”)

ELSE

    OUTPUT(“&”)


  • Follow-Ups:

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member