Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 79711 invoked from network); 8 Jul 2004 08:20:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 8 Jul 2004 08:20:57 -0000 Received: (qmail 34336 invoked by uid 500); 8 Jul 2004 08:20:46 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 34278 invoked by uid 500); 8 Jul 2004 08:20:45 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 34265 invoked by uid 99); 8 Jul 2004 08:20:45 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [212.85.125.162] (HELO v07274.home.net.pl) (212.85.125.162) by apache.org (qpsmtpd/0.27.1) with SMTP; Thu, 08 Jul 2004 01:20:44 -0700 Received: from sj162.internetdsl.tpnet.pl (HELO ?127.0.0.1?) (lgawron.mobilebox@home@80.55.87.162) by matrix15.home.net.pl with SMTP; 8 Jul 2004 08:20:41 -0000 Message-ID: <40ED03D9.8090902@mobilebox.pl> Date: Thu, 08 Jul 2004 10:20:41 +0200 From: Leszek Gawron User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: users@cocoon.apache.org Subject: Re: Reading XML data from flowscript References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Derek Hohls wrote: > Is there is a simple function in flow script that > will allow me to: > - access a specified XML file (say, passed as a > request/sitemap parameter) you can get DOM from supplied uri via this code: > var resolver = null; > var source = null; > try { > resolver = cocoon.getComponent( SourceResolver.ROLE ); > source = resolver.resolveURI( yourURI ); > var document = SourceUtil.toDOM( source ); > > // process your document here > } finally { > if ( resolver != null ) { > if ( source != null ) > resolver.release( source ); > cocoon.releaseComponent( resolver ); > } > } > - read in one or nodes from the file and store > these as flowscript variables. use XPathApi http://xml.apache.org/xalan-j/apidocs/org/apache/xpath/XPathAPI.html > > Thanks > Derek > -- Leszek Gawron lgawron@mobilebox.pl Project Manager MobileBox sp. z o.o. +48 (61) 855 06 67 http://www.mobilebox.pl mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org