String tableruleFlag = request.getParameter("tableruleFlag");
CheckNossDataVO checkNossDataVO = new CheckNossDataVO();
checkNossDataVO.setTablerule_flag(tableruleFlag);
response.setCharacterEncoding("UTF-8");
response.setContentType("text/xml");
response.setHeader("Cache-Control", "no-cache");
String xml_utf = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
String xml_start = "<selects>";
String xml_end = "</selects>";
StringBuffer innerHtml = new StringBuffer("");
innerHtml.append("<select><value></value><text>--请选择--</text></select>");
List list = checkNossDataDao.getTableRuleNameList(checkNossDataVO);
for (int i = 0; i < list.size(); i++) {
checkNossDataVO = (CheckNossDataVO) list.get(i);
innerHtml.append("<select><value>");
innerHtml.append(checkNossDataVO.getTablerule_id());
innerHtml.append("</value><text>");
innerHtml.append(checkNossDataVO.getTablerule_name());
innerHtml.append("</text></select>");
}
String last_xml = xml_utf + xml_start + innerHtml + xml_end;
try {
response.getWriter().write(last_xml);
} catch (IOException e) {
e.printStackTrace();
}
CheckNossDataVO checkNossDataVO = new CheckNossDataVO();
checkNossDataVO.setTablerule_flag(tableruleFlag);
response.setCharacterEncoding("UTF-8");
response.setContentType("text/xml");
response.setHeader("Cache-Control", "no-cache");
String xml_utf = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
String xml_start = "<selects>";
String xml_end = "</selects>";
StringBuffer innerHtml = new StringBuffer("");
innerHtml.append("<select><value></value><text>--请选择--</text></select>");
List list = checkNossDataDao.getTableRuleNameList(checkNossDataVO);
for (int i = 0; i < list.size(); i++) {
checkNossDataVO = (CheckNossDataVO) list.get(i);
innerHtml.append("<select><value>");
innerHtml.append(checkNossDataVO.getTablerule_id());
innerHtml.append("</value><text>");
innerHtml.append(checkNossDataVO.getTablerule_name());
innerHtml.append("</text></select>");
}
String last_xml = xml_utf + xml_start + innerHtml + xml_end;
try {
response.getWriter().write(last_xml);
} catch (IOException e) {
e.printStackTrace();
}