List rows = jdbcTemplate.queryForList(SQL_select_Entry,new Object[] { 140000,0 });
for(int m=0;m<rows.size();m++,counter++){
infoBean = new InfoBean();
infoBean.setEid(((Map) rows.get(m)).get("EID").toString());
infoBean.setSid(((Map) rows.get(m)).get("SID").toString());
infoBean.setContent(((Map) rows.get(m)).get("INTRO").toString());
infoBean.setTitle(((Map) rows.get(m)).get("TITLE").toString());
infoBean.setSecname(((Map) rows.get(m)).get("SECNAME").toString());
infoBean.setPubtime(((Map) rows.get(m)).get("CREATE_TIME").toString());
String xml = ((Map) rows.get(m)).get("XML_OBJECT").toString();
xml_reader = null;
try {
xml_reader = new XMLReader(xml);
} catch (IOException e) {
System.out.println("解析XML时出错!!");
}
// 获取城市
element = xml_reader.getElement(null, "city");
infoBean.setZone(element.getAttributeValue("name"));
infoBean.setAddress(xml_reader.getElementAtrribute("address"));
infoBean.setPhone(xml_reader.getElementAtrribute("linktel"));
infoBean.setLinkman(xml_reader.getElementAtrribute("linkman"));
// 取 tag
tag_view = "";
element_list = xml_reader.getElementAtrributes("tag");
for (int i = 0; i < element_list.size(); i++) {
if (tag_view.length() > 0) {
tag_view = tag_view + "/";
}
tag = StringUtil.returnValidStr(((Element) element_list.get(i)).getAttributeValue("name"));
tag_view = tag_view
+ "<a href=\"dosearch.shtml?q="
+ tag
+ "&view=2&type=l&encoding=gbk&area=tag\" target=\"_blank\" class=\"a01\" >"
+ tag + "</a>";
}
infoBean.setTag(tag_view);
infoBeanArrayList.add(m,infoBean);
//this.createXML(infoBean,m,out);
System.out.println("已经处理"+m+"条记录!");
}
我已经调整堆栈空间的大小,-Xms256m -Xmx768m,而且是在jbuilder2006下用纯java的环境测试的!
HUWWW
饮歌长啸
米琪卡哇伊
相关分类