HtmlNodeAttributes
Returns a table of attribute name and value pairs of an HTML Node
- Free Function
- SQL Server Compatibility: 2008, 2012, 2014, 2016, 2017
SELECT *
FROM SQLHTTP.net.HtmlNodeAttributes ( @HtmlNode )
| Name | Type | Description |
|---|---|---|
| @HtmlNode | nvarchar(MAX) | String containing an HTML element node |
| Column name | Data type | Description |
|---|---|---|
| RowID | int | Item Index |
| Name | nvarchar(4000) | Attribute Name |
| Value | nvarchar(MAX) | Attribute Value |
|
1 2 3 4 5 6 7 |
DECLARE @HtmlNode varchar(MAX) SET @HtmlNode = '<img src="image.png" alt="Logo">' SELECT * FROM SQLHTTP.net.HtmlNodeAttributes(@HtmlNode) |
|
1 2 3 4 5 6 |
RowID Name Value ----------- ------------------- ------------------- 1 src image.png 2 alt Logo |