title: How to display html elements defined in xml file on JSP page
body: <p>I'm currently working on a web application where in I'm continuously adding new columns to the database tables for new projects. I don't want to keep any dependency on Java program to display new column details on JSP page hence I want to define each and every html element/components including attributes in the XML file and want to load them dynamically on the web page (JSP). I know we can read below XML file using any Java XML parser but actual problem is while placing the html elements on the JSP page.</p>
  
  <p>I'm using struts 2 framework.</p>
  
  <p>Sample XML file</p>
  
  <pre><code>&lt;?xml version= "1.0" encoding ="UTF-8"?&gt;
  &lt;!DOCTYPE ROOTCOMPONENT [
  &lt;!ATTLIST COMPONENT
      COMP_NAME CDATA #REQUIRED
      COMP_TYPE CDATA #REQUIRED
      LABLE CDATA #IMPLIED
      SIZE CDATA #IMPLIED
      TABLE_NAME CDATA #IMPLIED  
      COLUMN_NAME CDATA #IMPLIED  
  &gt;
  ]&gt;
  &lt;ROOTCOMPONENT &gt;
  &lt;COMPONENT COMP_NAME="INPUT" COMP_TYPE="TEXT"  LABLE="User Name" /&gt; 
  &lt;COMPONENT COMP_NAME="INPUT" COMP_TYPE="PASSWORD"  LABLE="Password"/&gt; 
  &lt;/ROOTCOMPONENT&gt;
  </code></pre>
  
  <p>Would it be possible? Does anyone knows how it can be achieved? Any sample code snippet would be really helpful.</p>