XML DOM tutoria...login
XML DOM tutorial
author:php.cn  update time:2022-04-13 15:27:56

DOM Comment object



tryitimg.gifTry it - Example


The example below uses the XML file books.xml.
External JavaScript is used to load XML files.

createComment() - Creates a comment node


Comment object

The Comment object represents the content of the comment node in the document.

Comment Object Properties

PropertiesDescription
dataSet or return the text of this node.
lengthReturns the length of the text of this node.

Comment Object Method

MethodDescription
appendData()Append data to the node.
deleteData()Delete data from the node.
insertData()Insert data into the node.
replaceData()Replace the data in the node.
substringData()Extract data from the node.

php.cn