Skip to Content
Special Edition Using XML, Second Edition
book

Special Edition Using XML, Second Edition

by - et al. David Gulbransen
July 2002
Intermediate to advanced
864 pages
22h 32m
English
Que
Content preview from Special Edition Using XML, Second Edition

Comments

Although we've mentioned comments briefly before, we're mentioning them one last time here in detail to make sure you understand their usage, and to make a point about working with code in documents and DTDs.

Both XML files and Document Type Definitions may contain comments, which are simply pieces of text that are completely ignored by the XML parser, so they can contain just about anything you want to put in them.

Contents in XML take the form

<!-- Comment --> 

The comment must begin with the <!-- string, and it must end with the --> string. Here's an example of a comment:

<!--  This is my XML document. --> 

If we had

<!- This is not a valid comment --> 

or

<!-- This is also not a valid comment -> 

it would not be a valid comment. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

XML Pocket Reference, 3rd Edition

XML Pocket Reference, 3rd Edition

Simon St. Laurent, Michael Fitzgerald
Essential XML: Beyond Markup

Essential XML: Beyond Markup

Don Box, Aaron Skonnard, John Lam

Publisher Resources

ISBN: 078972748XPurchase book