XML DOM | Comment Object

XML DOM - Comment Object


Hello folks! welcome back to a new section of our tutorial on XML DOM. In this tutorial guide, we will be discussing about the XML DOM Comment Object.

XML DOM Comment object represents the content of comment nodes in a document.

Comments are added as notes on the lines to understand the purpose of an XML code. Comments can be used for adding related links, information and terms. These may be placed anywhere in the XML code.


Syntax

The following below is the syntax to use the XML DOM Comment Object -

<!-------Your comment----->

A comment starts with <!--- and ends with --->. You can add textual notes as comments between the characters. You must not nest one comment inside the other.

XML DOM Comment Object Attributes and Methods

The Comment Object has no attributes and methods defined to it. It inherits those of its parent, CharacterData, and indirectly those of Node.


Alright guys! This is where we are going to be rounding up for this tutorial post. In our next tutorial, we will be studying about the XML DOM XMLHttpRequest Object.

Feel free to ask your questions where necessary and we will attend to them as soon as possible. If this tutorial was helpful to you, you can use the share button to share this tutorial.

Follow us on our various social media platforms to stay updated with our latest tutorials. You can also subscribe to our newsletter in order to get our tutorials delivered directly to your emails.

Thanks for reading and bye for now.