I wonder if the following can be done:
I have a set of XML files but with no reference to what schema is
being used or where to find it.
Nevertheless, the documents were generated according to a XML schema.
The documents look like:
<myTag attr1="abc">
<mySubElement attrX="xyz" attrY="abc"/>
...
</myTag>
Instead of something like:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns1:myTag attr1="abc"
xsi:schemaLocation="
http://www.acme.com/xml/schemas
http://www.acme.on/xml/schemas/MyTag.xsd"
xmlns:ns1="
http://www.acme.com/xml/schemas "
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<mySubElement attrX="xyz" attrY="abc"/>
...
<ns1:myTag>
a) I would like to validate the docuements against the schema, but if the
document itself does not contain what schema is using , Can I tell JAXB
what schema to use for validation ?
b) Can I tell JAXB where to find the schema ?
Thanks