I have tried to get xml property and xml task, how can I loop the 2 or more files which are in fileset? I get a file list when I tried to get them in for loop
so I can parse each xml property.
Test1.xml:
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
Test2.xml
<CATALOG>
<CD>
<TITLE>Empire Burlesque</TITLE>
<ARTIST>Bob Dylan</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Columbia</COMPANY>
<PRICE>10.90</PRICE>
<YEAR>1985</YEAR>
</CD>
</CATALOG>
They are in same folder I get its file set and added in a list, get its list of file in that folder, then I tried to parse these xml file and find out what each xml file have in there an element tag:
<target name="findxmlParse" >
<echo>${srcDir}/xmlfolder/</echo>
<resourcecount property="countObject">
<fileset id="filesref" dir="${srcDir}/xmlfolder/">
<include name="*.xml"/>
</fileset>
</resourcecount>
<!-- <echo message="There are ${countObject} object in This Folder ${srcDir}/xmlfolder/"/> -->
<property name="files" refid="filesref"/>
<for list="${files}" delimiter=";" param="file" >
<sequential>
<!-- <echo message=" @{file} "/> -->
<!-- this is working for only file not in list -->
<!-- <xmlproperty file="${srcDir}/xmlfolder/${file}" collapseAttributes="true" /> -->
<xmlproperty file="${srcDir}/xmlfolder/@{file}" collapseAttributes="true" />
<echo >@{file}--${note.to} -- ${CATALOG.CD.TITLE}</echo>
</sequential>
</for>
</target>
How can I parse those files and extract its element property by those filelist in particular folder?
${srcDir} - local dir