cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Velychko <>
Subject Re: Reading XML data from flowscript
Date Thu, 08 Jul 2004 09:17:38 GMT
Hello Peter,

Some corrections. I looked at mail of Leszek Gawron and uderstand that
I forgotten to release components used.
Taking into account the message of Leszek it sould be:

var uri = cocoon.parameters.myUri;
try {
        var resolver = cocoon.getComponent(;
        var parser = cocoon.getComponent(;
        var xpathProcessor = cocoon.getComponent(;
        var source = resolver.resolveURI(uri);
        var document =;
        var result = xpathProcessor.evaluateAsString(document,'/config/lang');
} finally {     

Thursday, July 8, 2004, 12:01:14 PM, you wrote:

PV> Hello Derek,

PV> Try to use the following

PV> function testPage() {
PV>         var uri = cocoon.parameters.myUri;
PV>         var resolver = cocoon.getComponent(;
PV>         var parser = cocoon.getComponent(;
PV>         var xpathProcessor = cocoon.getComponent(;
PV>         var source = resolver.resolveURI(uri);
PV>         var is =;
PV>         var document = parser.parseDocument(is);
PV>         print("res="+xpathProcessor.evaluateAsString(document,'/config/lang'))
PV> }

PV> Thursday, July 8, 2004, 10:41:04 AM, you wrote:

DH>> Is there is a simple function in flow script that 
DH>> will allow me to:
DH>> - access a specified XML file (say, passed as a 
DH>> request/sitemap parameter)
DH>> - read in one or nodes from the file and store
DH>> these as flowscript variables.

DH>> Thanks
DH>> Derek

Best regards,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message