View on GitHub


Raku bindings to the libxml2 native library

[Raku LibXML Project] / [LibXML Module] / Comment

class LibXML::Comment

LibXML Comment nodes


use LibXML::Comment;
# Only methods specific to Comment nodes are listed here,
# see the LibXML::Node documentation for other methods
my LibXML::Comment $comment .= new( :$content );

$ ~~ s/xxx/yyy/; # Stringy Interface - see LibXML::Text


This class provides all functions of LibXML::Text, but for comment nodes. This can be done, since only the output of the node types is different, but not the data structure. :-)


The class inherits from LibXML::Node. The documentation for Inherited methods is not listed here.

Many functions listed here are extensively documented in the DOM Level 3 specification ( Please refer to the specification for extensive documentation.

method new

method new( Str :$content ) returns LibXML::Comment

The constructor is the only provided function for this package. It is required, because libxml2 treats text nodes and comment nodes slightly differently.

2001-2007, Ltd.

2002-2006, Christian Glahn.

2006-2009, Petr Pajas.


This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0