attribute(withName:uri:stringValue:)
Returns an NSXMLNode object representing an attribute node with a given qualified name and string.
Declaration
class func attribute(withName name: String, uri URI: String, stringValue: String) -> AnyParameters
- name:
A string that is the name of an attribute.
- URI:
A URI (Universal Resource Identifier) that qualifies
name. - stringValue:
A string that is the value of the attribute.
Return Value
An NSXMLNode object of kind XMLNode.Kind.attribute or nil if the object couldn’t be created.
Discussion
For example, in the attribute “bst:id=`12345’”, “bst” is the name qualifier (derived from the URI), “id” is the attribute name, and “12345” is the attribute value.
See Also
Creating and Initializing Node Objects
init(kind:)init(kind:options:)document()document(withRootElement:)element(withName:)element(withName:children:attributes:)element(withName:stringValue:)element(withName:uri:)attribute(withName:stringValue:)text(withStringValue:)comment(withStringValue:)namespace(withName:stringValue:)dtdNode(withXMLString:)predefinedNamespace(forPrefix:)processingInstruction(withName:stringValue:)