<?xml version="1.0"?>
<project name="aaa" default="test">

	<xml id="x1">
		<book>
			<author>
				<name>John</name>
				<surname>Smith</surname>
			</author>
			<title>John Smith's life</title>
		</book>
	</xml>
	
	<target name="test">

		<xmlpeek refid="x1" xpath="book/author/name" property="authorname"/>
		<echo message="${authorname}"/>
    </target>
    
</project>

