Contents

init(kind:)

Returns an NSXMLNode instance initialized with the constant indicating node kind.

Declaration

convenience init(kind: XMLNode.Kind)

Parameters

  • kind:

    An enum constant of type Kind Swift.enum that indicates the type of node. See Constants for a list of valid NSXMLNodeKind constants.

Return Value

An NSXMLNode object initialized with kind or nil if the object couldn’t be created. If kind is not a valid NSXMLNodeKind constant, the method returns an NSXMLNode object of kind NSXMLInvalidKind.

Discussion

This method invokes init(kind:options:) with the options parameter set to NSXMLNodeOptionsNone.

Do not use this initializer for creating instances of XMLDTDNode for attribute-list declarations. Instead, use the dtdNode(withXMLString:) class method of this class or the init(xmlString:) method of the NSXMLDTDNode class.

See Also

Related Documentation

  • Tree-Based XML Programming Guide

Creating and Initializing Node Objects