HtmlNodeAttribute
Retrieves the value of an HTML Node Attribute
- Free Function
- SQL Server Compatibility: 2008, 2012, 2014, 2016, 2017
SELECT SQLHTTP.net.HtmlNodeAttribute ( @HtmlNode, @Name )
Name | Type | Description |
---|---|---|
@HtmlNode | nvarchar(MAX) | String containing an HTML element node |
@Name | nvarchar(MAX) | Name of the Attribute to be retrieved |
nvarchar(MAX)
1 2 3 4 5 6 |
DECLARE @HtmlNode nvarchar(MAX) SET @HtmlNode = N'<img src="image.png" alt="Logo" />' SELECT SQLHTTP.net.HtmlNodeAttribute(@HtmlNode, 'src') |
1 2 3 4 5 |
------------------- image.png |