Home >>XML Tutorial >XML Comments
Comments in XML are much like comments in HTML. We are mindful that the comments are intended to render certain developers' software more understandable.
XML Comments add notes or lines to comprehend the purpose of XML code. Though XML is known as data self-description, XML comments are sometimes required.
Syntax
An XML comment should be written as:
Let's take an illustration of an XML document to show how comment is used:
<?xml version="1.0" encoding="UTF-8" ?>
<!--Students marks -->
<students>
<student>
<name>AB</name>
<marks>55</marks>
</student>
<student>
<name>CD</name>
<marks>80</marks>
</student>
</students>