XML Comments
XML comment is nothing but a piece of text, that we can include in the XML document to make it more readable. Comments don’t carry data and are used for the understanding purpose purely. For example – You may want to mark a piece of XML data with the XML comment so that anyone who is looking at the XML document can understand the purpose of that data. In this guide, we will learn how to write comments in XML document.
Syntax of XML comment
Whatever written between will be treated as a comment.
XML comment example
Look at this example, here we have a single comment just before the root element. This comment explains the purpose of the tags that are following the comment. As you can see, the comment improves the readability of the XML document, we can understand the purpose of the tags by reading a piece of text mentioned as a comment.
Steve
34
2000$
Chaitanya
31
5000$