Contents

setAttributesAs(_:)

Sets the attributes of the receiver based on the key-value pairs specified in the passed-in dictionary.

Declaration

func setAttributesAs(_ attributes: [AnyHashable : Any])

Parameters

  • attributes:

    A dictionary of key-value pairs where the attribute name is the key and the object value of the attribute is the dictionary value.

Discussion

The method uses these names and object values to create XMLNode objects of kind XMLNode.Kind.attribute. Existing attributes are not removed.

See Also

Handling Attributes