package hu.karsany.veloxi;

import org.xml.sax.SAXException;

import javax.xml.parsers.ParserConfigurationException;
import java.io.File;
import java.io.IOException;
import java.util.Map;

/**
 * Hello world!
 */
public class App {
    public static void main(String[] args) throws IOException, SAXException, ParserConfigurationException {
        File xmlFile = new File(args[0]);

        XMLParser parser = new XMLParser(xmlFile);

        Map<String, Object> map = parser.parse();
        VelocityOutput output = new VelocityOutput(new File(args[1]));


        // new MapOutput(map).print();


        for (Map.Entry e : map.entrySet()) {
            output.put((String) e.getKey(), e.getValue());
        }

        System.out.println(output.generate());


    }
}

@@ -542,15 +542,43 @@
 ile(
-args%5B1%5D
+new File(args%5B1%5D).getAbsolutePath()
 ));%0A

work without absolute velocity path