XmlElement.addAttribute

void addAttribute(string qname, string value, XmlLocation location = XmlLocation.init) @safe

Adds an attribute.

Parameters

qnameAttribute QName.
valueAttribute value.
locationOptional location in the source XML.

Throws

XmlException if an attribute with the same expanded name {uri,local} already exists.