How To Comment In XML Tag Block or Single Line?

RSS
FACEBOOK
FACEBOOK
PINTEREST
PINTEREST
LINKEDIN
INSTAGRAM

XML comments are very useful in order to explain the XML tags. Also if we want to test some XML code with and without we can use comments to enable or disable single line or XML tag block. XML has similar syntax and terms to the HTML and also comment term is the same.

Comment XML Block

As XML is a hierarchical language there may be a lot of tags which are parents and children of others. This named as XML tag block. We can command XML tag block which consists of multiple XML tags with the <!-- CODEBLOCK -->

We can see in the following example we will comment on the second student which is in red. This means the second student named Ahmet will not processes by XML processors.

Comment Single Line

We can comment a single line with the <!-- SINGLELINE -->. This will only affect to the single line and do not comment upper or lower lines.

LEARN MORE  Javascript Syntax and Basics

RSS
FACEBOOK
FACEBOOK
PINTEREST
PINTEREST
LINKEDIN
INSTAGRAM