Comments posted to this topic are about the item OPENXML
Thanks for the interesting example of what happens when you mix attribute-centric and element-centric mapping in one xml structure.
The use of XQuery would be better vs. OPENXML which is generally considered to be obsolete. It is more readable which helps to avoid errors.
Additionally, OPENXML is a resource hog. See the SQLServerCentral article:
Answering Carla's question directly - try the following:
FROM OPENXML (@hdoc, '/test/value',3)
WITH (id int,
i.e. the flags Argument can be a combination of Byte Values (1 (attribute-centric) and 2 (element-centric))
Viewing 4 posts - 1 through 3 (of 3 total)