aspose file tools*
The moose likes XML and Related Technologies and the fly likes bchitr Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "bchitr" Watch "bchitr" New topic
Author

bchitr

b panigrahy
Greenhorn

Joined: Apr 11, 2006
Posts: 14
Hi,

I am parsing an XML file against a XSD with Apache XERCES parser.
I am using a FileReader object to pass it to the PARSE method of XERCES parser and after it finishes parsing, it's closing the STREAM of FILEREADER.

But, I would not like to close the STREAM as I would use the same READER further in the code.

Pleae, suggest me.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18911
    
    8

What would be the point of that? Surely the place you are reading from contains an XML document and nothing else? Which would mean there's nothing else to read from that Reader.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12825
    
    5
Trying to re-use a Reader is false economy.

Instead, reuse the File object that represents to source file.

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: bchitr