XML Quiz

Roger L Costello <[email protected]>
Newsgroups gmane.text.xml.devel
Message-ID <SA9PR09MB5952A6D7E9CE433148C71980C8C09@SA9PR09MB5952.namprd09.prod.outlook.com>
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("&")
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.