I have a java class that applies an xslt to all xml files in a directory and performs a transformation on every xml it finds and prints out the complete filename.
My question is how would I create an xml (Files.xml),which would have the following format, and then ouputs the file name, file type and file extension to Files.xml?
<files> <file> <name> ThisFile </name> <type> xml </type> <extension> .xml </extension> </file> <file> <name> AnotherFile </name> <type> xml </type> <extension> .xml </extension> </file> etc.... </files>
Once again I appreciate any and all help I get!
I would recommend using a serialization utility like JAXB or XStream to serialize the file model directly but I leave you here a small sample that builds the document from scratch.
Hope it helps.