GetAttribute Method
Gets the value of the attribute with the specified name.
Syntax
public string? GetAttribute(string name);
Parameters
Name | Type | Description |
---|---|---|
name | string | The qualified name of the attribute. |
Return Value
Returns the value of the attribute as a string
, or null
if the attribute does not exist.
Remarks
The GetAttribute
method retrieves the value of an attribute on the current node.
The search is case-sensitive and includes namespace-qualified names.
Examples
View C# example