You can also add comments to an XML document. Comments go just about anywhere and are ignored  for data processing purposes. Comments are bracketed by the <!– and –> character sequences. The following listing includes three valid comments:

C# 8.0 and .NET Core 3.0 – Modern Cross-Platform Development: Build applications with C#, .NET Core, Entity Framework Core, ASP.NET Core, and ML.NET using Visual Studio Code, 4th Edition
ASP.NET Core 3 and Angular 9: Full stack web development with .NET Core 3.1 and Angular 9, 3rd Edition
C# in Depth, 4th Edition


<?xml version=”1.0″?>


<!– This is an example . –>

<Book ISBN-13=” 978-0545139700” Title = Title>Harry Potter and the Deathly Hallows“>

<Author>J.K. Rowling</Author>




<Book ISBN-13=”978-1451648539” Title=”Steve Jobs”>

<Author>Walter Isaacson</Author>


<Available>False <!– Why isn’t available ? –> </Available>


<!– Other books omitted for clarity. –>


The only place you can’t put a comment is embedded within a start or end tag (as in <myData <!– A comment should not go here –></myData>).