HtmlTable_To_Xml

Converts an HTML Table to XML

  • Free Function
  • SQL Server Compatibility: 2008, 2012, 2014, 2016, 2017

Syntax:

SELECT SQLHTTP.net.HtmlTable_To_Xml ( @Html, @FirstRowContainsHeaderNames )

Arguments:

Name Type Description
@Html nvarchar(MAX) An nvarchar(MAX) HTML string
FirstRowContainsHeaderNames bit 1 = The first <tr> tag will contain <th> tags.
0 = The first <tr> tag will NOT contain <th> tags, unless the HTML Table contains a <thead> tag

Return Type:

xml

Remarks:

and

tags are not included in the resulting XML

Sample Usage:

See Also: