Generates Transact-SQL XQuery statements directly from XML data

  • Stored Procedure
  • SQL Server Compatibility: 2008, 2012, 2014, 2016, 2017


EXEC SQLHTTP.net.XQueryHelper @Xml, [@RootPath], [@includeColumnCount]


Name Type Description
@Xml xml Required. An XML to be analyzed.

@RootPath varchar(MAX) Optional. XPath Root Path value. If not provided, all possible valid paths will be outputted with additional helpful information. See examples below.
@IncludeColumnCount bit Optional. A boolean indicator whether to output the number of columns in each possible output when the @RootPath is NULL. See example below.

Sample Usage:

Calling XQueryHelper WITHOUT a @RootPath parameter:
Calling XQueryHelper WITH a @RootPath parameter:
Result of generated XQuery:

See Also: