Instance Method

setRootElement(_:)

Set the root element of the receiver.

Declaration

func setRootElement(_ root: XMLElement)

Parameters

root

An XMLNode object that is to be the root element.

Discussion

As a side effect, this method removes all other children, including NSXMLNode objects representing comments and processing-instructions.

See Also

Managing the Root Element

func rootElement() -> XMLElement?

Returns the root element of the receiver.