XML Comment



XML Comments

  • XML comments are similar to HTML comments.
  • It is used to make the codes more understandable for other developers to use.
  • Comments not consider as a XML code.
  • These comments add notes or lines for the purpose of better understanding the XML code.
  • XML is known as self-describing data but sometimes XML comments are necessary.
  • Comments begin with a <!-- and end with a -->
  • XML Comments will ignored by the parser not to be validated.

Syntax

An XML comment should be written as:

<!-- Write your comment-->

Read Also

C# Comment

Example For Comments

 XML Comments

Learn - XML tutorial - XML Comments - XML examples - XML programs

Rules for adding XML comments

  • Doesn't use the comments before an XML declaration.
  • We can use these comments anywhere in XML document except within attribute value.
  • Don't nest the comments inside the other.


Related Searches to XML Comment