Problem Reading XML Files

Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
2 posts Page 1 of 1


Posts: 3
Joined: Fri Aug 01, 2014 10:26 am

Post by TViens » Tue Nov 04, 2014 2:53 pm
Assistance please. I have been trying to read in fields from and XML file. In the log the variables for the fields are assigned odd values. I also tried using a template and modifying it read a simple XML file. Values from the XML are not returned the way that I expected.

I get interesting output in the log files when trying to read the values out.

11/4/14 2:51:38 PM INFO Data parsed successfully and the rowset variable(s) 'xmlData' were created
11/4/14 2:51:38 PM INFO Finished task 'xmlRead 1.0 (Read XML File)'
11/4/14 2:51:38 PM INFO Executing task 'print 1.0'
11/4/14 2:51:38 PM INFO ------------------
[email protected]
11/4/14 2:51:38 PM INFO Finished task 'print 1.0'

My simple project looks like this.
Code: Select all
<project name="xml3" mainModule="Main" version="2.0" logLevel="verbose">

	<module name="Main">

		<xmlRead label="Read XML File" file="/data/cloverleaf_test/test_ftp/settings.xml" defaultDateFormat="yyyy-MM-dd" defaultTimeFormat="HH:mm:ss" defaultTimestampFormat="MM/dd/yyyy HH:mm:ss.SSS" version="1.0">
			<rowset name="xmlData">
				<column index="1" value="/settings/archiving/daystokeep" name="COLUMN1" type="INTEGER" />
				<column index="2" value="/settings/archiving/daystokeep" name="COLUMN2" type="CHAR" />
				<column index="3" value="/settings/archiving/daystokeep" name="COLUMN3" type="DATE" />

		<print version="1.0">



My XML file is simple.
<alert name="filenotfound">
<email>[email protected]</email>



Support Specialist
Posts: 592
Joined: Tue Jul 17, 2012 2:12 pm
Location: Phoenix, AZ

Post by Support_Rick » Mon Nov 10, 2014 12:56 pm

Just do a ForEach over the Rowset that has been read then address each Field as a sub-value of that rowset...

ForEach ${XMLData} -- ThisRec
SetVariable ... Days2Keep = ${ThisRec[1]}
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
2 posts Page 1 of 1