I am new to XML programming. Could you see my updated code and give me suggestion and a solution?
The code has not been changed as far as I can see. There's still the obvious errors at line 38/40

I have already told you what you need to query to retrieve the folder/file name from the <folder>/<file> element, and you are already using the relevant function. Wysota has already given you the name of the attribute you want. If you explain which part you do not understand we can help