【发布时间】:2013-06-06 22:42:24
【问题描述】:
我在课堂上有以下代码。 当它处理时,它会生成具有相同标签值的 xml,该标签值位于数据库的最新行中。 我什至尝试重新初始化对象,但它不起作用
while (tempResultSet.next()) {
conList = new ContentList();
conChannel = new ContentChannel();
conChannel.setType(String.valueOf(tempResultSet.getInt("Key")));
pubDate.setStart(tempResultSet.getTimestamp("PUBLISHSTARTDATETIME").toString());
conElement.setPubDate(pubDate);
conElement.setConChannel(conChannel);
conList.setConElement(conElement);
newConList.add(conList);
conList = null;
conChannel = null;
}
【问题讨论】:
-
您在哪里打印(查看)XML 文件?
ContentList();是什么?
标签: java arraylist jaxb resultset