|
发表于 2020-7-26 08:15:01
|
显示全部楼层
你的jsp
response.setContentType("text/xml;charset=GBK");
StringBuffer buf = new StringBuffer();
buf.append("<?xml version=\"1.0\" encoding=\"GBK\"?>");
buf.append("<root> ");
while(rs.next())
{
buf.append("<node id='"+rs.getString(1)+"' hasChildren='"+rs.getString(4)+"' pro='"+rs.getString(5)+"'> "+ rs.getString(3)+ " </node>");
}
buf.append(" </root>");
out.print(buf);
|
|