Html_To_Xml

Converts an HTML string to XML

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

Syntax:

SELECT SQLHTTP.net.Html_To_Xml ( @Html )

Arguments:

Name Type Description
@Html nvarchar(MAX) An HTML string

Return Type:

xml

Remarks:

Note that an HTML does not require a closing for the certain tags, but XML does.

Sample Usage:

In this example converting the Html to Xml results in a closing tag for the tag:

See Also: