Contents

addAttribute(_:)

Adds an attribute node to the receiver.

Declaration

func addAttribute(_ attribute: XMLNode)

Parameters

  • attribute:

    An XML node object representing an attribute. If the receiver already has an attribute with the same name, anAttribute replaces the old attribute.

Discussion

The order of multiple attributes is preserved if the NSXMLPreserveAttributeOrder option is specified when the element is created.

See Also

Handling Attributes