Simple question, but can't find the answer anywhere.
I want to load an XML config file into memory, and then access its element and attribute values from flowscript using XPath. It will be a different file for each page request (these parameters will be used to help create the response).
Essentially, I'd like to create something like this in the flowscript:
function setParams(uri) {
cocoon.context.setAttributes("params", -config file data here-);
}Here's the config file (example):
<?xml version="1.0" encoding="UTF-8"?>
<params>
<color>blue</color>
<size>XL</size>
<quantity>5</quantity>
</params>I want to be able to access these parameters like this:
setParams("params/default.xml");color = cocoon.context.params.color;
Is this possible and if so, how?
Any help greatly appreciated.
Chas. Munat Seattle
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
