• I dont understand the point about the doc not being loaded into ram for xpath

    taken from your xpath sample,

    DECLARE @Doc XML

    SET @Doc = (SELECT * FROM OPENROWSET(BULK 'C:\xml\StockMarketDataAsElements.xml',SINGLE_BLOB) AS x)

    has this not loaded the doc into ram?