I am working XML document recently, I am thinking to add comments in some section of XML document, so I would like to know easy way to add comments in XML Document.
There are few ways to add comments in XML:
You can wrap the text with a non-existing processing-instruction as shown below
<book> <?ignore <author> <name>john</name> </author> ?> </book>
<!--...--> format to add comments, which is similar to comment in HTML doc:
<!-- <data> <data-field1></data-field1> <data-field2></data-field2> <data-field3></data-field3> </data> -->
Subscribe to our weekly Newsletter & Keep getting latest article/questions in your inbox weekly