| How to parse a schema from an InputStream [message #587445] |
Tue, 25 May 2004 08:14 |
|
Originally posted by: hoe.zurich.ibm.com
How do I parse an XSDSchema from an InputStream instead of a URI? I've
tried to register a special URIConverter that returns the desired
stream, but that itself does not seem to be enough: e.g. somehow the
ability to access the cached XSD schema was lost.
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "xsd",
new XSDResourceFactoryImpl());
ResourceSet resourceSet = new ResourceSetImpl();
resourceSet.setURIConverter(new SingletonURIConverter(in,
resourceSet.getURIConverter());
Resource resource =
resourceSet.getResource(SingletonURIConverter.SINGLETON_URI, true);
Thanks,
Christian
|
|
|
Powered by
FUDForum. Page generated in 0.01560 seconds