Using the exact XML & XSD from this example worked and i realized what i was doing wrong.
Now that the program is ready to validate with an XML Schema definition, it is necessary only to ensure that the XML document is associated with (at least) one.
There are two ways to do that: , which stands for "XML Schema instance." The second line specifies the schema to use for elements in the document that do not have a namespace prefix-that is, for the elements you typically define in any simple, uncomplicated XML document.
So a namespace that does have a name can never be used as the default namespace.
When parsed, each element in the data set will be validated against the appropriate schema, as long as those schemas have been declared.
You also set a factory attribute to specify the parser language to use.