[XML-DEV Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: XML quiz
- From: Mukul Gandhi <mukulg@softwarebytes.org>
- To: Roger L Costello <costello@mitre.org>
- Date: Tue, 8 Jun 2021 09:50:03 +0530
Thanks, for sharing these insightful facts.
Particularly, an entity reference within XML PI and its result upon parsing, which I haven't thought about earlier.
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>
--
- References:
- XML quiz
- From: Roger L Costello <costello@mitre.org>
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
RSS 2.0 |
|
Atom 0.3 |
|
|
Stylus Studio has published XML-DEV in RSS and ATOM formats,
enabling users to easily subcribe to the list from their preferred news reader application.
|
Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website.
they were not included by the author in the initial post. To view the content without the Sponsor Links please
click here.
|
|