OpenXmlElement.GetAttribute-Methode
Gets a Open XML attribute with the specifed tag name and namespace URI.
Namespace: DocumentFormat.OpenXml
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'Declaration
Public Function GetAttribute ( _
localName As String, _
namespaceUri As String _
) As OpenXmlAttribute
'Usage
Dim instance As OpenXmlElement
Dim localName As String
Dim namespaceUri As String
Dim returnValue As OpenXmlAttribute
returnValue = instance.GetAttribute(localName, _
namespaceUri)
public OpenXmlAttribute GetAttribute(
string localName,
string namespaceUri
)
Parameter
- localName
Typ: System.String
The tag name.
- namespaceUri
Typ: System.String
The namespace URI.
Rückgabewert
Typ: DocumentFormat.OpenXml.OpenXmlAttribute
Returns a clone of the OpenXmlAttribute which local name is "localName" and namespace URI is "namespaceUri".
Ausnahmen
Ausnahme | Bedingung |
---|---|
ArgumentOutOfRangeException | When the "localName" is emtpy. |
KeyNotFoundException | When the element does not have the specifed attribute. |