Contents

namespace(withName:stringValue:)

Returns an NSXMLNode object representing a namespace with a specified name and URI.

Declaration

class func namespace(withName name: String, stringValue: String) -> Any

Parameters

  • name:

    A string that is the name of the namespace. Specify an empty string for name to get the default namespace.

  • stringValue:

    A string that identifies the URI associated with the namespace.

Return Value

An NSXMLNode object of kind XMLNode.Kind.namespace or nil if the object couldn’t be created.

Discussion

The equivalent namespace declaration in XML markup is xmlns:``name``="``value``".

Special Considerations

Applications linked on macOS 10.6 or later will throw an exception if the name parameter is nil.

See Also

Creating and Initializing Node Objects