XQuery [nodes()]: '<eof>' 附近的语法错误,需要一个步骤表达式

XQuery [nodes()]: Syntax error near '<eof>', expected a step expression

运行下面SQL/XPath查询returns下面错误:

查询:

;WITH XMLNAMESPACES (
  'http://schemas.microsoft.com/win/2004/08/events/event' as ns
, default 'http://schemas.microsoft.com/win/2004/08/events/event'
)

select [Events].[Event].value('(./System/TimeCreated/@SystemTime)[1]','nvarchar(100)') EventTime
from @xml.nodes('/*/Event/') [Events]([Event])

错误:

XQuery [nodes()]: Syntax error near '<eof>', expected a step expression.

发件人:http://www.experts-exchange.com/Database/MS-SQL-Server/Q_27789732.html

问题出在 xpath 末尾的 /。即

from @xml.nodes('/*/Event/') [Events]([Event])

应该是:

from @xml.nodes('/*/Event') [Events]([Event])