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



Reply via email to