Contents

init(name:stringValue:)

Returns an NSXMLElement object initialized with a specified name and a single text-node child containing a specified value.

Declaration

convenience init(name: String, stringValue string: String?)

Parameters

  • name:

    A string specifying the name of the element.

  • string:

    The string value of the receiver’s text node.

Return Value

The initialized NSXMLElement object or nil if initialization did not succeed.

Discussion

The string representation of this object is <``name``>``string``</``name``>.

See Also

Initializing NSXMLElement Objects