Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 19984 invoked from network); 9 Jun 2004 16:30:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 9 Jun 2004 16:30:25 -0000 Received: (qmail 55201 invoked by uid 500); 9 Jun 2004 16:30:29 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 55095 invoked by uid 500); 9 Jun 2004 16:30:28 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 55071 invoked by uid 99); 9 Jun 2004 16:30:28 -0000 Received: from [62.116.51.59] (HELO kerberos) (62.116.51.59) by apache.org (qpsmtpd/0.27.1) with SMTP; Wed, 09 Jun 2004 09:30:28 -0700 Received: From mail.at.efp.cc ([62.116.51.60]) by kerberos (WebShield SMTP v4.5 MR1a); id 1086790662733; Wed, 9 Jun 2004 16:17:42 +0200 Received: from [194.107.80.26] (wrpo.at.intra.efp.cc [194.107.80.26] (may be forged)) by mail.at.efp.cc (8.11.3/8.11.3/SuSE Linux 8.11.1-0.5) with ESMTP id i59EHfQ09259 for ; Wed, 9 Jun 2004 16:17:42 +0200 Message-ID: <40C71BA1.6090202@apache.org> Date: Wed, 09 Jun 2004 16:16:01 +0200 From: Reinhard Poetz User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: [cforms] Simple XML binding References: <40C5E53D.9070309@nada.kth.se> <40C606E2.50903@apache.org> <40C717E0.9070103@nada.kth.se> In-Reply-To: <40C717E0.9070103@nada.kth.se> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Daniel Fagerstrom wrote: > I have added loadXML(uri) and saveXML(uri) to the api, now the example > look like: > > // get the documentURI parameter from the sitemap which contains the > // location of the file to be edited > var documentURI = cocoon.parameters["documentURI"]; > > // populate the form > form.loadXML(documentURI); > > // show the form to the user until it is validated successfully > form.showForm("form2-display-pipeline"); > > // save the content of the form to a file > form.saveXML(makeTargetURI(documentURI)); > > // show the xml generated from the form > cocoon.sendPage("form2simpleXML-success-pipeline", form.getXML()); > > Here we also save the content to a file (or any modifiable source). > The getXML() method is still part of the api as it gives the > possiblity to use the content handler and xmlizable interfaces, and > also to set properties for the adapter, (this far only the choise of > locale for string conversion). > > /Daniel > Very nice! -- Reinhard