After I did some internet research I found out that nodes function for xml processing of Sql Server does not accept a variable as parameter. If I try to use a variable a get the following error:
The argument 1 of the XML data type method "nodes" must be a string literal.
This is what I am trying to do:
SET @xPath = REPLACE(@xPath,'|','/')
SET @xPath = '/' + @xPath + '/text()'
SELECT @ParsedHtml = @ParsedHtml + CONVERT(nvarchar(max),Col.query('.')) + ';' FROM @Html.nodes(@xPath)AS T(Col)
Is there any hack i can do to make nodes function accept a variable as parameter???