Java Reference
In-Depth Information
Valid? true
If you rearrange either your schema or your XML document so that it is invalid, you will see
a message similar to this one:
Validation Error: cvc-elt.1: Cannot find the declaration of element
'dude'.
Valid? false
The DOM parser built-in to Java SE 6 is not namespace-aware by default, so you must set
that property on the DocumentBuilderFactory . If you forget to set that, there's no show; any
errors in validation will be blissfully overlooked, even if the handler is set.
For documents to be validated correctly, the schema for elements in the default namespace
must be declared.
Search WWH ::




Custom Search