How to specify the comment in the XML document?
How to specify the comment in the XML document? Correct Answer <!-- -->
Concept:
XML stands for extensible markup language which lets you define your own tags in the order they occur. It is derived from SGML (Standard Generalized markup language).
Explanation:
- XML is a platform-independent language. It is used to store and organize the data. The first line in the XML document is the XML prolog which includes XML declaration, DOCTYPE, version, and comments. XML documents must contain a root element.
- Comments can be used to include links, information, and terms in XML. They can be seen in source code only and appear anywhere in the code. Comments are for understanding the code.
Syntax for comment in XML is :
<!-- comment--- >
XML is slightly different from HTML. In HTML, we have predefined tags, while in XML we have to define our own tags. XML .XML is used for storing and transporting the data. Using the XML sharing of data between two programs on different platforms is possible.
মোঃ আরিফুল ইসলাম
Feb 20, 2025