Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - DOM Developer's Guide

Output

After you build and run the project, the application should produce the following output in a console window:

Validating DOM...
        XMLDoc is not valid because
Content for element 'review' is invalid according to the DTD/Schema.
Expecting: pub_date.

        <book> (0) is a valid node
        <book> (1) is not valid because
Content for element 'review' is invalid according to the DTD/Schema.
Expecting: pub_date.

        <author> (0) is a valid node
        <title> (1) is a valid node
        <genre> (2) is a valid node
        <price> (3) is a valid node
        <pub_date> (4) is a valid node
        <review> (5) is a valid node
        <author> (6) is a valid node
        <title> (7) is a valid node
        <genre> (8) is a valid node
        <price> (9) is a valid node
        <review> (10) is a valid node

Next, we'll demonstrate how to manage the lifetime of a DOM object using reference counting.