comment(withStringValue:)
Returns an Xmlnode object representing a comment node containing given text.
Declaration
class func comment(withStringValue stringValue: String) -> AnyParameters
- stringValue:
A string specifying the text of the comment. You may specify
nilor an empty string (see Return Value).
Return Value
An XMLNode object representing an comment node (XMLNode.Kind.comment) containing the text stringValue or nil if the object couldn’t be created. If stringValue is nil or an empty string, a content-less comment node is returned (<!--->).
See Also
Creating and Initializing Node Objects
init(kind:)init(kind:options:)document()document(withRootElement:)element(withName:)element(withName:children:attributes:)element(withName:stringValue:)element(withName:uri:)attribute(withName:stringValue:)attribute(withName:uri:stringValue:)text(withStringValue:)namespace(withName:stringValue:)dtdNode(withXMLString:)predefinedNamespace(forPrefix:)processingInstruction(withName:stringValue:)