git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@151008 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
e216917149
commit
af905ef49a
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue