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:
<!– This is an example . –>
<Book ISBN-13=” 978-0545139700” Title = Title>Harry Potter and the Deathly Hallows“>
<Book ISBN-13=”978-1451648539” Title=”Steve Jobs”>
<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>).