%XML_DOC_SETCOMMENT
Set a comment at the XML document level
WSupported on Windows
|
USupported on Unix
|
VSupported on OpenVMS
|
NSupported in Synergy .NET
|
status = %XML_DOC_SETCOMMENT(document, comment)
Return value
status
XML_SUCCESS if a comment is set.
Arguments
document
The XML document instance to set a comment for. (XML_DOC_TYPE)
comment
The comment string to set. (a)
Discussion
Comments are hidden from the end user when the output document is displayed. A comment in an XML document has the format
<!--comment-->
%XML_DOC_SETCOMMENT adds the opening and closing characters (“<!--” and “-->”, respectively) for you; the comment argument should only include the text of the comment.
Note the following restrictions:
- Double hyphens (--) are not allowed as part of the comment text.
- Nested comments are not allowed.
This function is defined as ^VAL.
Examples
The function
status = %xml_doc_setcomment(document,"this is my comment")
sets a comment that looks like this:
<!--this is my comment-->