Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 49893 invoked by uid 500); 23 Jul 2001 15:48:31 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 49882 invoked from network); 23 Jul 2001 15:48:30 -0000 Message-ID: <000501c1138e$aeb0f140$66c1c0c0@deepford> From: "C. Gaffga" To: "Cocoon Users" Subject: [C2] Problem: Checking XML before including it (XSPUtil.include) Date: Mon, 23 Jul 2001 17:46:46 +0200 Organization: Triplemind Internet Services OHG MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2462.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.0000 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N I have some XML stored in the database an want to include in in my page. Im using the following code in my XSP-page: try { ... org.apache.cocoon.components.language.markup.xsp.XSPUtil.include( __is, this.contentHandler, newParser); } catch (Exception e) {
XML-Error XML: e.getMessage()
} that work's fine if the XML is wellformed, but if it's not, it's the problem that not just the error message is outputted but also all XML that has been processed before the Error occured. How can I check the XML before? I tried to start the parser with no conumer but that throws an exception every time parser.setConsumer(null); parser.parse(__is); Is the a dummy consumer? something like dev/null ? Christoph Gaffga P.S.: It's no performence Problem for my Application if the XML is processed twice. --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: