This commit is contained in:
Lucio Lelii 2017-07-12 12:56:19 +00:00
parent e216917149
commit af905ef49a
1 changed files with 5 additions and 2 deletions

View File

@ -12,12 +12,15 @@ import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory; import javax.xml.parsers.SAXParserFactory;
import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang.StringEscapeUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xml.sax.Attributes; import org.xml.sax.Attributes;
import org.xml.sax.SAXException; import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler; import org.xml.sax.helpers.DefaultHandler;
public class GML2CSV { public class GML2CSV {
private static final Logger LOGGER = LoggerFactory.getLogger(GML2CSV.class);
public static void convertHTMLToXML(String gmlhtmlFile,String gmlxmlFile) throws Exception{ public static void convertHTMLToXML(String gmlhtmlFile,String gmlxmlFile) throws Exception{
BufferedWriter filew = new BufferedWriter(new FileWriter(new File(gmlxmlFile))); BufferedWriter filew = new BufferedWriter(new FileWriter(new File(gmlxmlFile)));
@ -96,7 +99,7 @@ public class GML2CSV {
row = new ArrayList<String>(); row = new ArrayList<String>();
} }
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace();
} }
} }
tagcounter--; tagcounter--;
@ -117,7 +120,7 @@ public class GML2CSV {
saxParser.parse(gmlFile, handler); saxParser.parse(gmlFile, handler);
filew.close(); filew.close();
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LOGGER.error("error parsing GML ",e);
} }
} }