Revision 479 tmp/org.txm.groovy.core/src/groovy/org/txm/macro/csv/CSV2XMLMacro.groovy

CSV2XMLMacro.groovy (revision 479)
3 3
import org.kohsuke.args4j.*
4 4
import groovy.transform.Field
5 5
import java.nio.charset.Charset
6
import org.txm.rcp.swt.widget.parameters.*
6
import org.txm.rcpapplication.swt.widget.parameters.*
7 7
import org.txm.utils.*
8 8
import javax.xml.stream.*
9 9
import java.net.URL
......
69 69
if (!ok) { return; }
70 70

  
71 71
String name = inputFile.getName()
72
int idx = name.indexOf(".")
72
int idx = name.lastIndexOf(".")
73 73
if (idx > 0) name = name.substring(0, idx)
74 74
File outputfile = new File(inputFile.getParentFile(), name+".xml")
75 75
XMLOutputFactory factory = XMLOutputFactory.newInstance()

Also available in: Unified diff