Output from the validateDOM.js Example

 

[This sample output requires features that were first implemented in MSXML 5.0 for Microsoft Office Applications.]

When you run the validateDOM project, you should get the following output:

Validating DOM...  
        XMLDoc is not valid because  
Element 'review' is unexpected according to content model of parent element 'boo  
k'.  
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.