• I prefer OPENXML. I think it is easy to then use WHERE, JOIN, and ORDER BY clauses. Using the data in the article, it would look like this:

    Declare @xml XML, @idoc int

    SET @xml = N'

    '

    EXEC sp_xml_preparedocument @idoc OUTPUT, @xml

    SELECT Name, Salary FROM OPENXML (@idoc, '/ROWS/ROW', 1)

    WITH (Name varchar(50), Salary int)

    WHERE Salary >= 1500

    ORDER BY Name