OpenXmlElement.SetAttribute-Methode

Set an attribute to the 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)

Syntax

'Declaration
Public Sub SetAttribute ( _
    openXmlAttribute As OpenXmlAttribute _
)
'Usage
Dim instance As OpenXmlElement
Dim openXmlAttribute As OpenXmlAttribute

instance.SetAttribute(openXmlAttribute)
public void SetAttribute(
    OpenXmlAttribute openXmlAttribute
)

Parameter

Ausnahmen

Ausnahme Bedingung
ArgumentNullException

Thrown when the LocalName of the "openxmlAttribute" parameter is null or empty.

InvalidOperationException

Thrown when attempting to set a namespace declaration.

Siehe auch

Referenz

OpenXmlElement Klasse

OpenXmlElement-Member

DocumentFormat.OpenXml-Namespace