The list, set, map, and props elements allow complex properties or constructor arguments of type java.util.List, java.util.Set, java.util.Map, and java.util.Properties to be defined and set. Let's look at a completely artificial example, in which a JavaBean has a List, Set, Map, and Properties property set:

<beans>
  <bean id="collectionsExample" class="ch02.sample7.CollectionsBean">
    <property name="theList">
      <list>
        <value>red</value>
        <value>red</value>
        <value>blue</value>
        <ref local="curDate"/>
        <list>
          <value>one</value>
          <value>two</value>
          <value>three</value>
        </list>
      </list>
    </property>
    <property name="theSet">
      <set>
        <value>red</value>
        <value>red</value>
        <value>blue</value>
      </set>
    </property>
    <property name="theMap">
      <map>
        <entry key="left">
          <value>right</value>
        </entry>
        <entry key="up">
          <value>down</value>
        </entry>
        <entry key="date">
          <ref local="curDate"/>
        </entry>
      </map>
    </property>
    <property name="theProperties">
      <props>
        <prop key="left">right</prop>
        <prop key="up">down</prop>
      </props>
    </property>
  </bean>
   
  <bean id="curDate" class="java.util.GregorianCalendar"/>
</beans>

List, Map, and Set values may be any of the elements