Click or drag to resize

OpenXmlElementSetAttribute Method

Sets an attribute to the specified element. If the attribute is a known attribute, the value of the attribute is set. If the attribute is an extended attribute, the 'openxmlAttribute' is added to the extended attributes list.

Namespace: DocumentFormat.OpenXml
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll) Version: 2.11.3+Branch.master.Sha.3fcdea311b5a001803ff150de35c25fd4cd62f93.3fcdea311b5a001803ff150de35c25fd4cd62f93
Syntax
public void SetAttribute(
	OpenXmlAttribute openXmlAttribute
)

Parameters

openXmlAttribute  OpenXmlAttribute
The attribute to be set on the element.
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown when the LocalName of the "openxmlAttribute" parameter is null or empty.
InvalidOperationExceptionThrown when an attempt to set a namespace declaration is made.
See Also