WriteComment
Writes out a comment that contains the specified text.
Syntax
HRESULT WriteComment (const WCHAR * pwszComment);
Arguments
pwszComment
The text of the comment. NULL is equivalent to an empty string.
Return Value
Returns S_OK if no error is generated.
Remarks
This method produces a comment in the following format, where text is the text provided:
<!-- text -->
If the text block provided contains the characters "-->
", which denote the end of a comment, this method will insert a space between the two "-
" characters. This change to the text prevents the writer from producing an XML document that is not well-formed.
If the pwszComment
parameter is NULL, the writer produces a comment that does not contain any text.
For an example of the use of the WriteComment
method, see Write an XML Document using XmlLite.
Requirements
Header: XmlLite.h
Library: XmlLite.lib