Partager via


Output for the errorXPath Example

 

When you build and run the errorXPath application, you should get the following output in a message box.

Validating DOM...  
invalid dom:  
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]  
  
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:  
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]  
  
Node is invalid:  
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]