Webmaster  |  Imprint 
C++ Server Pages
Main  |  License  |  Documentation  |  Download 

Comment Class Reference

A Comment element (Node) of an XML document, containing the comment's content. More...

#include <cxxtools/xml/comment.h>

Inheritance diagram for Comment:

Node

List of all members.

Public Member Functions

 Comment (const String &Text)
 Constructs a new Comment object with the given string as content/Text.
 ~Comment ()
 Empty destructor.
Commentclone () const
 Clones this Comment object by creating a duplicate on the heap and returning it.
Stringtext ()
 Returns the content/Text of this Comment object.
const Stringtext () const
 Returns the content/Text of this Comment object.
void setText (const String text)
 Sets the Text of this Comment object.


Detailed Description

A Comment element stores the content of a comment. There is no interpretation of the comment's Text before it is stored.

Use Text() to get the content/Text of the comment element without the <!-- and -->.

When parsing a comment %<!-- This is a comment -->$ the following Text will be returned by Text(): $This is a comment$

See also:
Node

Constructor & Destructor Documentation

Comment ( const String Text  ) 

Parameters:
Text The content/Text of the Comment object.


Member Function Documentation

Comment* clone (  )  const [virtual]

Returns:
A cloned version of this Comment object.

Implements Node.

String& text (  ) 

The content includes everything that is between the start and end "tags" of the comment without being parsed. When parsing a comment %<!-- This is a comment -->$ the following Text will be returned: $This is a comment$

Returns:
The Text of this Comment object.

const String& text (  )  const

The content includes everything that is between the start and end "tags" of the comment without being parsed. When parsing a comment %<!-- This is a comment -->$ the following Text will be returned: $This is a comment$

Returns:
The Text of this Comment object.

void setText ( const String  text  ) 

Parameters:
text The new Text for this Comment object.

Copyright © 2008 The Tntnet Development Team
Tntnet 1.6