XmlExtensions.GetAttributes Method

Returns the values of the specified attribute in each element in the collection. Does not return NULL or empty values. This element is introduced in Windows PowerShell 5.0.

Namespace: Microsoft.OneGet.Utility.Extensions
Assembly: Microsoft.OneGet.Utility (in Microsoft.OneGet.Utility.dll)


Dim elements As IEnumerable(Of DynamicElement)
Dim attributeName As String
Dim returnValue As IEnumerable(Of String)

returnValue = XmlExtensions.GetAttributes(elements, attributeName)


<ExtensionAttribute> _
Public Shared Function GetAttributes ( _
    elements As IEnumerable(Of DynamicElement), _
    attributeName As String _
) As IEnumerable(Of String)
public static IEnumerable<string> GetAttributes (
    IEnumerable<DynamicElement> elements,
    string attributeName
static IEnumerable<String^>^ GetAttributes (
    IEnumerable<DynamicElement^>^ elements, 
    String^ attributeName
/** @attribute ExtensionAttribute() */ 
public static IEnumerable<String> GetAttributes (
    IEnumerable<DynamicElement> elements, 
    String attributeName
public static function GetAttributes (
    elements : IEnumerable<DynamicElement>, 
    attributeName : String
) : IEnumerable<String>


  • elements
  • attributeName

Return Value

Returns IEnumerable.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


Target Platforms

See Also


XmlExtensions Class
XmlExtensions Members
Microsoft.OneGet.Utility.Extensions Namespace