If you're using a workflow process to drive your template, you are best doing this by creating a
Local Variable for that process, populating it with the relevant XML and then reading that from the template. You can use
Set Job Infos and Variables, select your variables and assign them using:
xmlget('/root[1]/documents[1]/document[1]/environment[1]/@value',Value,KeepCase,NoTrim)
xmlget('/root[1]/documents[1]/document[1]/url[1]/@value',Value,KeepCase,NoTrim)
You can read the variables from within the template by calling
ExpandString('%{MyLocalVar}') in PressTalk or as a custom data selection.
However, if you aren't using workflow and wish to read an external file from the template, you'll need the
execscriptfile function in PressTalk. This is designed to drive an external script much like the one you run under the
Run Script action in workflow.
More information about that function:
ExecScriptFile.
You'd need a VBScript or similar which - when prompted - reads your XML file and returns the values you require.
Note: The script will return a single value and so you'd need to delimit the return values such that you can separate them again.The first approach is by far the recommended course of action (where possible).
Hope this helps.
Regards,
James.