Skip to content

Instantly share code, notes, and snippets.

@StartAutomating
Created September 26, 2025 19:09
Show Gist options
  • Save StartAutomating/c0be393a26187505525744c691140dff to your computer and use it in GitHub Desktop.
Save StartAutomating/c0be393a26187505525744c691140dff to your computer and use it in GitHub Desktop.
Gist Get the SVG Elements
<#
.SYNOPSIS
Get the SVG Elements
.DESCRIPTION
Get the SVG Elements, as defined by the Mozilla Developer Network
.LINK
https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element
#>
$elementRoot = "https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element"
Invoke-WebRequest $elementRoot |
ForEach-Object { $_.Links } |
Where-Object Href -match '/Element' |
ForEach-Object { ($_.OuterHtml -as [xml]).a.code } |
Select-Object -Unique |
Sort-Object |
Select-Object @{
Name='Element'
Expression={"$_" -replace '[<>]'}
}, @{
Name='Href'
Expression={$elementRoot, ("$_" -replace '[<>]') -join '/'}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment