Index: tmp/org.txm.core/src/java/org/txm/importer/ValidateXml.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/importer/ValidateXml.java	(revision 2880)
+++ tmp/org.txm.core/src/java/org/txm/importer/ValidateXml.java	(revision 2881)
@@ -34,7 +34,10 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
+import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamConstants;
 import javax.xml.stream.XMLStreamException;
@@ -42,15 +45,16 @@
 
 import org.eclipse.osgi.util.NLS;
 import org.txm.core.messages.TXMCoreMessages;
+import org.txm.utils.logger.Log;
+import org.xml.sax.SAXException;
 
-// TODO: Auto-generated Javadoc
 /**
- * Validate a xml file with a stax parser.
+ * Validate a XML file with a Stax parser.
  *
  * @author mdecorde
  */
 public class ValidateXml {
-	
+
 	/**
 	 * @throws XMLStreamException test a String, not implemented.
 	 *
@@ -75,7 +79,7 @@
 			XMLInputFactory factory = XMLInputFactory.newInstance();
 			XMLStreamReader parser = factory.createXMLStreamReader(inputData);
 			for (int event = parser.next(); event != XMLStreamConstants.END_DOCUMENT; event = parser.next()) {
-				
+
 			}
 			parser.close();
 			inputData.close();
@@ -87,7 +91,7 @@
 		}
 		return true;
 	}
-	
+
 	/**
 	 * test a content stored in a String, not implemented.
 	 *
@@ -98,7 +102,7 @@
 	public static boolean test(String xmldata) {
 		return testAndGetError(xmldata).length() == 0;
 	}
-	
+
 	/**
 	 * test a content stored in a String, not implemented.
 	 *
@@ -108,15 +112,41 @@
 	 */
 	public static String testAndGetError(String xmldata) {
 		try {
-			Node records = new XmlParser().parseText(xmldata);
+			new XmlParser().parseText(xmldata);
 			return "";
 		}
-		catch (Exception e) {
-			System.out.println(e.getLocalizedMessage());
-			return e.toString();
+		catch (IOException | ParserConfigurationException e) {
+			return e.getMessage();
 		}
+		catch (SAXException ex) {
+			return getXMLError(null, ex);
+		}
 	}
-	
+
+	private static String getXMLError(String file, Exception e) {
+		String message = e.getMessage();
+
+		Matcher msgParse = null;
+		if (message.startsWith("ParseError at")) {
+			Pattern p = Pattern.compile("(ParseError at \\[row,col\\]:\\[)([0-9]+),([0-9]+)\\]\n" + 
+					"Message: (.+).");
+			msgParse = p.matcher(message); // getMessageAndLocation
+		} else {
+			Pattern p = Pattern.compile("^(.*) lineNumber: ([0-9]+); columnNumber: ([0-9]+); (.*).$");
+			msgParse = p.matcher(message); // getMessageAndLocation
+		}
+
+		if (msgParse.matches() && msgParse.groupCount() == 4) {
+			String lineNumber = msgParse.group(2);
+			String colNumber = msgParse.group(3);
+			String errMsg = msgParse.group(4);
+
+			return TXMCoreMessages.bind("** {0} [line {1}, character {2}]: {3}.", file, lineNumber, colNumber, errMsg);
+		} else {
+			return message;
+		}
+	}
+
 	/**
 	 * test a file.
 	 *
@@ -143,18 +173,18 @@
 			XMLInputFactory factory = XMLInputFactory.newInstance();
 			XMLStreamReader parser = factory.createXMLStreamReader(inputData);
 			for (int event = parser.next(); event != XMLStreamConstants.END_DOCUMENT; event = parser.next()) {
-				
+
 			}
 			parser.close();
 			inputData.close();
 			return true;
 		}
 		catch (Exception e) {
-			System.out.println(e.getLocalizedMessage());
+			System.out.println(getXMLError(infile.toString(), e));
 			return false;
 		}
 	}
-	
+
 	/**
 	 * small test to verify a file is a XML-TEI file.
 	 *
@@ -200,7 +230,7 @@
 			}
 			parser.close();
 			inputData.close();
-			
+
 			boolean test = n == 3 && tei < teiHeader && teiHeader < text;
 			if (test) {
 				return true;
@@ -228,7 +258,7 @@
 			return false;
 		}
 	}
-	
+
 	/**
 	 * The main method.
 	 *
@@ -237,7 +267,7 @@
 	 */
 	public static void main(String[] args) {
 		for (File file : new File(System.getProperty("user.home"), "xml/teierrors").listFiles()) {
-			if (ValidateXml.teiTest(file)) {
+			if (ValidateXml.test(file)) {
 				System.out.println("OK: " + file); //$NON-NLS-1$
 			}
 			else {
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xml/xmlLoader.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xml/xmlLoader.groovy	(revision 2880)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xml/xmlLoader.groovy	(revision 2881)
@@ -129,21 +129,29 @@
 // copy xml+dtd files
 if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
 List<File> srcfiles = srcDir.listFiles();
-if (srcfiles != null)
-	for (int i = 0 ; i < srcfiles.size() ; i++) {// check XML format, and copy file into binDir
+def ignoredFiles = [];
+if (srcfiles != null) {
+	for (int i = 0 ; i < srcfiles.size() ; i++) {// check XML format, and copy file into the "txm" directory
 		File f = srcfiles.get(i)
 		if (f.getName().equals("import.xml") || f.getName().matches("metadata\\.....?") || f.getName().endsWith(".properties")) {
 			srcfiles.remove(i);
 			i--;
-			continue;
+			continue; // don't raise warnings for those files
 		}
-		if (ValidateXml.test(f)) {
+		if (f.getName().toLowerCase().endsWith(".xml") && ValidateXml.test(f)) {
 			FileCopy.copy(f, new File(txmDir, f.getName()));
 		} else {
-			println "Won't process file "+f;
+			ignoredFiles << f;
 		}
 	}
+} else {
+	println "The $srcDir source directory is empty. Aborting."
+	return;
+}
 
+if (ignoredFiles.size() > 0) {
+	println "Warning: some files won't be imported: "+ignoredFiles.join(", ")
+}
 if (txmDir.listFiles() == null) {
 	println "No txm file to process"
 	return;
