Use relative path with spaces in XML Reader

Hey everyone,

I’m trying to create a workflow to read out all settings of another workflow. So I hopefully get a workflow documentation in a few seconds. I found this topic:

I tried to copy the idea. Therefore I use the XML Reader and the workflow.knime and settings.xml files in my workflow folder. I did it with absolute pathes and everything worked fine. To be more flexible, I want to switch to relative pathes in the XML Reader. Now I have the problem that the XML Reader can’t read a relative path with spaces.

For example:
The absolute path D:\KNIME\Workspaces\WorkflowFolder\MyWorkflow\Column Filter (#5)\settings.xml has some spaces between Column and Filter and between Filter and (#5). The XML Reader works fine with this path.

The relative path knime://LOCAL/WorkflowFolder/MyWorkflow/Column Filter (#5)/settings.xml has also some spaces between Column and Filter and between Filter and (#5). Now I get an error message that there are some illegal characters in the path.

Is there any way that the XML Reader works with spaces as well?

Thanks a lot.

You need to URL-encode the spaces with either ‘%20’ (or ‘+’ might work), so for the url, ‘knime://LOCAL/WorkflowFolder/MyWorkflow/Column Filter (#5)/settings.xml’, you would enter ‘knime://LOCAL/WorkflowFolder/MyWorkflow/Column%20Filter%20(#5)/settings.xml’ - You might also need to URL encode some of the other characters (e.g. ‘(’, ‘#’ and ‘)’) - the above link gives a list.

Alternatively, if you have a big list of settings.xml and workflow.knime files to read in a table, use the ‘Load text-based files’ node from the @Vernalis community contribution:

Followed by XML to String.



Hi Christina,
in the case of knime:// paths KNIME treats this as a URI, a special kind of path. Can you try it with knime://LOCAL/WorkflowFolder/MyWorkflow/Column%20Filter%20(#5)/settings.xml? The %20 is the encoded value of SPACE for URIs.
Kind regards


That works! I have to use %20 for space and %23 for # and now everything is fine.

Thank you very much!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.