Output for the validateNode Example

MSXML 5.0 SDK

Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - DOM Reference

Output for the validateNode Example

When you build and run the validateNode code, you should get the following output, displayed in three message boxes.

  • The first message box contains the following text:
    invalid dom:
    Content for element 'review' is invalid according to the DTD/Schema.
    Expecting: price.

    This message is the result of using the import() method to import the entire DOM object.

  • The second message is the output from the validateNode method when it is applied to the first <book> node, which is valid against the schema:
    <book id="bk001">
         <author>Hightower, Kim</author>
         <title>The First Book</title>
         <genre>Fiction</genre>
         <price>44.95</price>
         <pub_date>2000-10-01</pub_date>
         <review>An amazing story of nothing</review>
    </book>
  • The final message is the output from the validateNode method when it is applied to the second <book> node, which is invalid against the schema:
    invalid node:
    Content for element 'review' is invalid according to the DTD/Schema.
    Expecting: price.