How to programatically assign a validating schema using Xerces?

Duncan Smith

Usenet Archive
Joined
Jul 14, 2003
Messages
152
Reaction score
0
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
 

Jesper Zedlitz

Usenet Archive
Joined
Dec 9, 2002
Messages
20
Reaction score
0

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
548,042
Messages
3,104,223
Members
248,131
Latest member
Tonypshaw1

Latest Threads

Top