XmlExtensions.GetAttribute Method
Gets the first non-null or non-empty value for a specified attribute in a specified collection of elements. This element is introduced in Windows PowerShell 5.0.
Namespace: Microsoft.OneGet.Utility.Extensions
Assembly: Microsoft.OneGet.Utility (in Microsoft.OneGet.Utility.dll)
'Usage
Dim elements As IEnumerable(Of DynamicElement)
Dim attributeName As String
Dim returnValue As String
returnValue = XmlExtensions.GetAttribute(elements, attributeName)
'Declaration
<ExtensionAttribute> _
Public Shared Function GetAttribute ( _
elements As IEnumerable(Of DynamicElement), _
attributeName As String _
) As String
[ExtensionAttribute]
public static string GetAttribute (
IEnumerable<DynamicElement> elements,
string attributeName
)
[ExtensionAttribute]
public:
static String^ GetAttribute (
IEnumerable<DynamicElement^>^ elements,
String^ attributeName
)
/** @attribute ExtensionAttribute() */
public static String GetAttribute (
IEnumerable<DynamicElement> elements,
String attributeName
)
ExtensionAttribute
public static function GetAttribute (
elements : IEnumerable<DynamicElement>,
attributeName : String
) : String
- elements
- attributeName
Returns String.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
XmlExtensions Class
XmlExtensions Members
Microsoft.OneGet.Utility.Extensions Namespace