[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
XML quiz
- From: Roger L Costello <costello@mitre.org>
- To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
- Date: Sun, 6 Jun 2021 21:11:31 +0000
Are entities recognized in comments? For example, in this XML document is a comment which contains an entity:
<Document>
<!-- & -->
</Document>
Will an XML parser replace the entity & with its replacement text &, to yield this:
<Document>
<!-- & -->
</Document>
Are entities recognized in processing instructions? For example, in this XML document is a processing instruction which contains an entity:
<Document>
<?foo & ?>
</Document>
Will an XML parser replace the entity & with its replacement text &, to yield this:
<Document>
<?foo & ?>
</Document>
Scroll down to see the answers ........
No. No.
Entities are not recognized in comments nor processing instructions.
Thus, after parsing the comment and processing instruction still have the unaltered entity:
<Document>
<!-- & -->
</Document>
<Document>
<?foo & ?>
</Document>
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]