I have question where shoulb we use xmlcast/xmlquery/XMLTable/
XMLNamespaces ? is it depend on the xml you got?
I thought you would know that by now...
Of course, it depends on the requirement and the structure of the XML.
In general, if you want to extract a single value or an XML fragment, then use XMLQuery (and XMLCast on top of that for scalar values).
If you want to project the content as relational rows and columns (just like you needed here), then XMLTable is your choice.
XMLNamespaces() works within XMLTable() only, and most logically you need it if the nodes you want to extract belong to namespaces.