Output for the errorParams Example
[This sample output requries features that were implemented only in MSXML 6.0.]
When you build and run the errorParams code, you should get the following output in a message box.
Validating DOM...
invalid dom:
reason:
Element 'review' is unexpected according to content model of parent element 'book'.
Expecting: price.
errorXPath:
/*[local-name()="books" and namespace-uri()="urn:books"]/book[2]/review[1]
Parameters Count: 3
errorParameters(0): book
errorParameters(1): review
errorParameters(2): price
Validating nodes...
Node is valid:
<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>
Node is invalid:
reason: Element 'review' is unexpected according to content model of parent element 'book'.
Expecting: price.
errorXPath:
/*[local-name()="books" and namespace-uri()="urn:books"]/book[2]/review[1]
Parameters Count: 3
errorParameters(0): book
errorParameters(1): review
errorParameters(2): price
Node is invalid:
reason: Element 'review' is unexpected according to content model of parent element 'book'.
Expecting: pub_date.
errorXPath:
/*[local-name()="books" and namespace-uri()="urn:books"]/book[3]/review[1]
Parameters Count: 3
errorParameters(0): book
errorParameters(1): review
errorParameters(2): pub_date