I want to insert the Xml file data into MySQL table ,, by choosing which column to insert into ,, using Java How will this be done ?
我想通过选择要插入的列,将Xml文件数据插入到MySQL表中,使用Java如何完成?
1 个解决方案
#1
0
It really depends on the format of your XML file. If your XML file is a direct export from the MySQL file, please refer to this question.
这实际上取决于XML文件的格式。如果您的XML文件是从MySQL文件直接导出,请参阅此问题。
If your XML is in some other format, then I would probably be using JAXB to parse XML into POJO, then write some logic to map the POJO into the database table.
如果您的XML采用其他格式,那么我可能会使用JAXB将XML解析为POJO,然后编写一些逻辑将POJO映射到数据库表中。
#1
0
It really depends on the format of your XML file. If your XML file is a direct export from the MySQL file, please refer to this question.
这实际上取决于XML文件的格式。如果您的XML文件是从MySQL文件直接导出,请参阅此问题。
If your XML is in some other format, then I would probably be using JAXB to parse XML into POJO, then write some logic to map the POJO into the database table.
如果您的XML采用其他格式,那么我可能会使用JAXB将XML解析为POJO,然后编写一些逻辑将POJO映射到数据库表中。