element(withName:children:attributes:)
Returns an Xmlelement object with the given tag (name), attributes, and children.
Declaration
class func element(withName name: String, children: [XMLNode]?, attributes: [XMLNode]?) -> AnyParameters
- name:
A string that is the name (tag identifier) of the element.
- children:
An array of
NSXMLElementobjects orNSXMLNodeobjects of kinds Element, Processinginstruction, Comment, and Text. Specifynilif there are no children to add to this node object. - attributes:
An array of
NSXMLNodeobjects of kind Attribute. Specifynilif there are no attributes to add to this node object.
Return Value
An NSXMLElement object or nil if the object couldn’t be created.
See Also
Creating and Initializing Node Objects
init(kind:)init(kind:options:)document()document(withRootElement:)element(withName:)element(withName:stringValue:)element(withName:uri:)attribute(withName:stringValue:)attribute(withName:uri:stringValue:)text(withStringValue:)comment(withStringValue:)namespace(withName:stringValue:)dtdNode(withXMLString:)predefinedNamespace(forPrefix:)processingInstruction(withName:stringValue:)