Title: RE: Explicit file closing

Andy,
How does it work for external entities?
I noticed that external entity file stays open if an exception happens during its parsing. Unlike the XML file itself for entities I cant close their streams

Thank you

Alex

-----Original Message-----
From: Andy Clark [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 06, 2001 5:24 PM
To: [EMAIL PROTECTED]
Subject: Re: Explicit file closing


"Jodeleit, Peter" wrote:
> ok, just to make it more convenient ;) - what's the fix: postcondition is of
> parse is "file closed" or "file not closed"??

When you call parse(String), the parser resolves the systemId
and opens the stream. In this case, it will close the stream
when leaving the parse method, even on failure. However, when
you call parse(InputSource) and supply your own stream, then
the parser should not attempt to close the stream.

--
Andy Clark * IBM, TRL - Japan * [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to