/Milan Tomic/:
How should I set system ID on an InputSource? InputSource
interface does not have such method/constructor. I am using
FileInputStream to construct InpoutStream. Shouldn't that be
enough?
I don't know where you're looking at but the |InputSource| class [1]
has constructors for all the kind of sources there may be specified
and has getter/setters for all of its properties. So if you know
the source URI has a registered URL stream handler you could just
construct the |InputSource| with the URI:
File sourceFile;
...
InputSource source =
new InputSource(sourceFile.toURI().toString());
Or you could set the |systemId| after the construction:
File sourceFile;
...
InputStream byteStream = new FileInputStream(sourceFile);
InputSource source = new InputSource(byteStream);
source.setSystemId(sourceFile.toURI().toString());
[1] http://www.saxproject.org/apidoc/org/xml/sax/InputSource.html
--
Stanimir
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]