<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">

<beans>

	<bean id="tb" class="org.springframework.beans.TestBean" scope="prototype">
		<property name="age"><value>10</value></property>
		<property name="spouse">
			<bean class="org.springframework.beans.TestBean">
				<property name="age"><value>11</value></property>
			</bean>
		</property>
  </bean>
	
	<bean id="otb" class="org.springframework.beans.TestBean">
		<property name="age"><value>98</value></property>
		<property name="spouse">
			<bean class="org.springframework.beans.TestBean">
				<property name="age"><value>99</value></property>
			</bean>
		</property>
  </bean>

	<bean id="propertyPath1" class="org.springframework.beans.factory.config.PropertyPathFactoryBean">
		<property name="targetObject">
			<bean class="org.springframework.beans.TestBean">
				<property name="age"><value>12</value></property>
			</bean>
		</property>
		<property name="propertyPath"><value>age</value></property>
	</bean>

	<bean id="propertyPath2" class="org.springframework.beans.factory.config.PropertyPathFactoryBean">
		<property name="targetBeanName"><value>tb</value></property>
		<property name="propertyPath"><value>spouse.age</value></property>
	</bean>

	<bean id="tb.age" class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/>

	<bean id="otb.spouse" class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/>

	<bean id="tb.spouse" class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/>

	<bean id="tb.spouse.spouse" class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/>

	<bean id="propertyPath3" class="org.springframework.beans.factory.config.PropertyPathFactoryBean">
		<property name="targetBeanName"><value>tb</value></property>
		<property name="propertyPath"><value>spouse</value></property>
		<property name="resultType"><value>org.springframework.beans.TestBean</value></property>
	</bean>

	<bean id="tbWithInner" class="org.springframework.beans.TestBean">
		<property name="age" value="10"/>
		<property name="spouse">
			<bean name="otb.spouse" class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/>
		</property>
		<property name="friends">
			<bean name="otb.spouse" class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/>
		</property>
  </bean>

</beans>
