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
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