1. Use a XML parser(Xerces from www.apache.org, or jaxp in Jdk1.4) to parse the XML file, get the node value.Then put it in the table columan accordingly using insert statment.2. Java API provide interface for accessing RDBMS. Real implementation is done by the driver manufactuer. For you, the SQL statment for all the Dababase systems are the same. And the Driver should be able to convert your code to for the particular database system. 3. To get more information, you may download the tutorial from SUn, follow their JDBC-ODBC tutorial instructions. 

解决方案 »

  1.   

    to soldier1002(廖运河):
       第一点我也知道个大概,问题是我想看到细节或程序,而你说的比较粗略
       第二点,我原来表述的意思模糊了些,使用statement.executeUpdate()
    是比较简单的事。我不懂的是如何读取XML文档中的数据,然后对相应表的相应行或列进行update。   目前我仅在jaxp的文档里思考出一点眉目。大概是先要给目标xml文档设计对应的dtd,然后使用在一个defaultHandler的继承类里使用xmlreader来parse该目标文档(依照dtd)。正苦于没有例程看看,不知道如何编写。