Page 1 of 1

Issue reading XML file

Posted: Wed May 17, 2017 10:48 am
by martin1b
I have an XML file saved from Excel. Trying to import it into a rowset to insert it into an iseries file. My test project (attached) treats each cell as a row, rather than the rows treated as a row. Any ideas what I'm doing wrong?

Here is my XML:
Code: Select all
<project name="Read XML" mainModule="Main" version="2.0" logLevel="verbose">

	<module name="Main">

		<xmlRead file="resource:smb://server1/Information Technology/Web/Temp/GA/test.xml" version="1.0">
			<rowset name="data" nestedSharedValues="true">
				<column index="1" value="/Workbook/Worksheet/Table/Row/Cell" name="lastName" />
				<column index="2" value="/Workbook/Worksheet/Table/Row/Cell" name="firstName" />
			</rowset>
		</xmlRead>

		<forEachLoop itemsVariable="${data}" currentItemVariable="item" currentIterationVariable="loopCount" disabled="false">

			<print version="1.0">
				<![CDATA[${item[1]}]]>
			</print>

		</forEachLoop>
	</module>

</project>