• 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:

    [font="Arial Narrow"](PHB) I think we should build an SQL database. (Dilbert) What color do you want that database? (PHB) I think mauve has the most RAM.[/font]

  • Answering Carla's question directly - try the following:



    FROM OPENXML (@hdoc, '/test/value',3)

    WITH (id int,

    name varchar(10),

    class int,

    flag char(1))

    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)

You must be logged in to reply to this topic. Login to reply