Use language "Shell" for the code block
Now use classes for the different aspects of the script:
- configuration
- connecting via webdav
- building the xml