Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to load a XML-Schema (XSD) from Classpath

107137May 11 2006 — edited May 16 2006
Hi

I want to perform XML Schema Validation using a XML-Schema stored in a File "MySchema.xsd" in the classpath.
Unfortunately I have no clue, how I can load this file without using an absolute path. I already tried:
Thread.currentThead().getContextClassLoader().getRessourceAsStream()
but this method rejects to load Files with the extension XSD.It does however load the file, if I rename it to MySchema.xml or MySchema.properties, but then I cannot use the Visual Editors of JDeveloper to edit the File.

Has anyone an idea, how I can load a XSD-File stored in the classpath?

Thanks in advance
Frank Brandstetter
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 13 2006
Added on May 11 2006
4 comments
1,208 views