ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "BALARAJU Siva Prasad" <SBalar...@covansys.com>
Subject Regarding XmlProperty
Date Mon, 21 Apr 2003 10:54:14 GMT
Hi All,

I am facing some problem with ant xmlproperty task. i am using Ant 1.5.2.

My requirement is to read xml property file which contains sibling elements.i.e.,

<Classroom>
	<StudentInfo>
		<Student name="James" roolid="1"/>
		<Student name="Mark" roolid="2"/>
		<Student name="Jack" roolid="3"/>
	</StudentInfo>
</Classroom>

When i am trying to read the above specified xml property file using ant xmlproperty task,it
always returns first student info.

My Ant script is specified below....

<target name="init">

	<xmlproperty file="${...}/classroom.xml" collapseAttributes="true" validate="false"/>
	<property name="classroom.studentinfo.student1.name" value="${Classroom.StudentInfo.Student.name}"/>
	<property name="classroom.studentinfo.student2.name" value="${Classroom.StudentInfo.Student.name}"/>

	
	<echo message="${classroom.studentinfo.student1.name}"/>	
	<echo message="${classroom.studentinfo.student2.name}"/>
</target>

I read your mail in mailing lists but could not get the patch from that list.

Can you please provide the info where i can get the patch to solve this problem ?

Even if i am specifying validate="true",ant is throwing ErrorHandler exception.(i am trying
to validate my xml with schema) . In Ant 1.5.2, XmlValidate doesn't support schema validaton
it seems.

Any help is appreciated.

Thanks and Regards,
Siva.

Mime
View raw message