Knowing as little as I do about Unix I thought you still needed
a drive "letter" to write the XML file to. I've been told I can get
to the root but that it's root is "/bottomFolderName" (I was
expecting R:\webRootPath\yourFolder\etc\XMLFileWrittenHere).
No, that is Windows thinking. You were told right. In Linux,
a path usually begins with the forward slash /.
I had doubts about your code itself. Did you run your version
of my example on Windows? If it works, then you will only have to
replace the Windows path with something like the following. The
rest of the code remains the same.