taverna

Inserting XML data into MySQL database

寵の児 提交于 2019-12-11 23:22:23
问题 I am trying to insert XML data into a MySQL database. The SAX parser I wrote works on its own when tested. However, whenever I try to insert records into the database, I get a NullPointerException even though I made sure to assign values to workflow elements that were null. Here is my database Table code. package database; //STEP 1. Import required packages import java.sql.*; import java.io.*; import org.w3c.dom.*; import javax.xml.parsers.*; public class Table { // JDBC driver name and