Subject:Generic flat file -> xml converter Author:david mcdonnell Date:29 Aug 2006 12:28 PM
I have created a java application through stylus studio that converts a flat file to xml. I want it so that if I input a different flat file with the same name as the previous one that this flat file will be generated successfully. At present if I use a different flat file with different text it outputs the same xml from the "scenario" that i created in the xquery file.
Is the Java file supposed to generate the temporary xml file(before xquery mapping has taken place) on the fly? It doesnt seem to be, it keeps looking for it if it doesnt exist. Basically what i want to do is generate on the fly the converted xml file from the flat file but to possibly have different input flat files with the same structure.
// The first example uses a StreamSource and a StreamResult to identify the input and output.
StreamSource input = new StreamSource(exampleDir + "one.csv");
StreamResult output = new StreamResult(exampleDir + "one.xml");