perldoc > XML::DOM::Comment

📛 NAME

XML::DOM::Comment - 📝 An XML comment in XML::DOM

🚀 Quick Reference

Use Case Perl Code Description
🔧 Create a new comment node XML::DOM::Comment->new($doc, $data) Returns a new comment node with the given text
📖 Get comment text $comment->getData() Returns the string content of the comment (without <!-- and -->)
✏️ Set comment text $comment->setData($newdata) Replaces the entire comment content
➕ Append to comment $comment->appendData($string) Appends a string to the existing comment content
🔍 Get node type $comment->getNodeType() Returns COMMENT_NODE (constant 8)
🔗 Get parent node $comment->getParentNode() Returns the parent XML::DOM::Node or undef

📖 DESCRIPTION

XML::DOM::Comment extends XML::DOM::CharacterData which extends XML::DOM::Node.

This node represents the content of a comment, i.e., all the characters between the starting <!-- and ending -->. Note that this is the definition of a comment in XML, and, in practice, HTML, although some HTML tools may implement the full SGML comment structure.

XML::DOM::Comment
📛 NAME 🚀 Quick Reference 📖 DESCRIPTION

Generated by phpman v4.10.0-7-g98e9fd5 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-09-16 14:45 @216.73.216.175
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!