Output from validateDOM Example
[This sample code uses features that were first implemented in MSXML 5.0 for Microsoft Office Applications.]
After you build and run the project, the application should produce the following output in a console window:
Next, we'll demonstrate how to manage the lifetime of a DOM object using reference counting.
To test the validateDOM example
- Verify that you get the following output.
Output
Validating DOM...
XMLDoc is not valid because
Element 'review' is unexpected according to content model of parent element 'book'.
Expecting: pub_date.
Validating all book nodes, '//book', one by one ...
<book (0) is a valid node
<book> (1) is not valid because
Element 'review' is unexpected according to content model of parent element 'book'.
Expecting: pub_date.
Validating all children of all book nodes, //book/*, one by one...
<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 not valid beacause
Element 'review' is unexpected according to content model of parent element 'book'.
Expecting: pub_date.