83464207986a1b948069e73203bf92e247d756ac.svn-base 934 B

12345678910111213141516171819202122232425
  1. <%@ page contentType="text/xml; charset=UTF-8" language="java"%>
  2. <%@ page
  3. import ="com.sysmodel.datamodel.xmlmodel.ModelFactory,
  4. com.sysmodel.datamodel.xmlmodel.able.SysModel,
  5. com.sysmodel.datamodel.xmlmodel.impl.MdpAttributeImpl,
  6. com.sysmodel.datamodel.xmlmodel.able.MdpClass,
  7. java.util.*"
  8. %>
  9. <%
  10. SysModel sysmodel = ModelFactory.getSysmodel();
  11. String classid = request.getParameter("classid") == null ? "0" : request.getParameter("classid");
  12. MdpClass MdpClass = sysmodel.getMdpClassByClassID(Integer.parseInt(classid));
  13. ArrayList Attributes = (ArrayList)MdpClass.getAllMdpAttributes();
  14. out.print("<root>");
  15. for (int i = 0; i < Attributes.size(); i++) {
  16. MdpAttributeImpl MdpAttributeImpl = (MdpAttributeImpl) Attributes.get(i);
  17. out.print("<name>"+MdpAttributeImpl.getName()+"</name>");
  18. out.print("<description>"+MdpAttributeImpl.getDescription()+"</description>");
  19. }
  20. out.print("</root>");
  21. %>