How to programatically assign a validating schema using Xerces?

D

Duncan Smith

Hello All,

Has anyone found a way to specify an xsd schema programatically when
using the apache xerces xml processor? I know that the validation
works fine as long as the xml instance document explicitly refernces
the schema via an 'xsd:xsi schemaLocation=...' tab. But how can you
validate xml documents which don't contain the schemaLocation?

Reading the instance and assigning the schemaLocation before flushing
it back out and reading it back works, but is such bad practice and
wasteful that it's not really worth considering.

MSXML has a simple validateOnParse and Schema Location properties
which can be set when parsing an instance. I was hoping there would
something similar in Xerces?

Thanks for any furher info..

Duncan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top