Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Oracle XML DOMParser: can't parse multiple files

Re: Oracle XML DOMParser: can't parse multiple files

From: Jonathan Meeks <meeks_at_computer.org>
Date: Tue, 1 May 2001 16:48:51 -0500
Message-ID: <Pine.BSF.4.21.0105011642570.35328-100000@shell-3.enteract.com>

Where is this code throwing the error? parse.parse(fr) in the method parseFile? If so, what happens if your parse the second xml in the array, bypassing the while loop altogether.

It would also be helpful if you posted the stack trace.

On Tue, 24 Apr 2001, christian wrote:

> Hi!
>
> Here is the relevant part of the code:
>
> I have an ArrayList XMLFiles of all XML files I want to parse. The loop looks
> like:
>
> Iterator it = xmlFiles.iterator();
> while (it.hasNext()) {
> File f = (File)it.next();
> boolean ret = parseFile(f);
> if (ret) {
> // ...
> }
> }
>
> The method parseFile:
>
> private boolean parseFile(File path) {
> DOMParser parser = new DOMParser();
> // ...
> XMLDocument doc = null;
> try {
> parser.reset();
> FileReader fr = new FileReader(path);
> parser.setErrorStream(System.err);
> parser.setValidationMode(true);
> parser.showWarnings(true);
> parser.parseDTD(mydtd, "ejb-jar");
> DTD dtd = parser.getDoctype();
> parser.setDoctype(dtd);
> parser.parse(fr);
> doc = parser.getDocument();
> } catch // ...

 // ...
> }
>
> Many thanks in advance,
>
> Christian Domscha
>
>
>
Received on Tue May 01 2001 - 16:48:51 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US