I have a folder full of text files called MainFolder, and I want to convert the folder to an XML representation so that every file in the folder can be edited as a single text file. Would it be possible to generate an XML representation of a folder structure, as shown here, with files inside <file>
tags and folders inside folder
tags?
<folder name = "MainFolder">
<file name = "README.txt">
This is a text file inside a folder called MainFolder. This is the content
of README.txt.
</file>
<folder name = "Java samples">
<file name = "HelloWorld.java">
public class HelloWorld{
public static void main(String[] args){
System.out.println("Hello World!");
}
}
</file>
</folder>
</folder>