Skip to content

Error: When building rowset data", the root element did not match in the file

Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
  • anutta78 Offline
  • Posts: 5
  • Joined: Fri Sep 09, 2016 11:59 am

Error: When building rowset data", the root element did not match in the file

Post by anutta78 »

Having error when reading XML.. please advise

My XML:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<ns0:Study xmlns:ns0="http://www.clientname.com/Site">
<ns0:StudyNum>XA123654</ns0:StudyNum>
<ns0:InformationContained>Full</ns0:InformationContained>
<ns0:StudyRowId>1-SETYE9</ns0:StudyRowId>
<ns0:ListOfSite>
<ns0:Site>
<ns0:SiteNum>12345</ns0:SiteNum>
<ns0:SiteName>University Name</ns0:SiteName>
<ns0:CountryCode>CA</ns0:CountryCode>
<ns0:SiteRowId>1-TYU7ER</ns0:SiteRowId>
</ns0:Site>
</ns0:ListOfSite>
</ns0:Study>
Project:

Code: Select all

<project name="xml to excel" mainModule="Main" version="2.0" logLevel="verbose">
	<module name="Main">
		<xmlRead file="\userdata\2016_part.xml" validation="none" processedInputFilesVariable="toExcel" version="1.0" logLevel="debug">
			<rowset name="data">
				<column index="1" value="/Study" />
				<column index="2" value="/Study/StudyNum" />
				<column index="3" value="/Study/StudyNum/InformationContained" />
				<column index="4" value="/Study/StudyNum/InformationContained/StudyRowId" />
                                 ....

			</rowset>
		</xmlRead>


		<writeExcel inputRowSetVariable="${data}" outputFile="\userdata\fromXML.xlsx" whenFileExists="overwrite" excelFormat="excel2007" includeHeadings="true" version="2.0" />

	</module>

</project>

error:
When building rowset "data", the root element did not match in the file
  • Support_Rick Offline
  • Support Specialist
  • Posts: 590
  • Joined: Tue Jul 17, 2012 2:12 pm
  • Location: Phoenix, AZ
  • Contact:

Re: Error: When building rowset data", the root element did not match in the file

Post by Support_Rick »

anutta78,

Please review your access paths to your XML Data. Should be something like the following:

Code: Select all

		<xmlRead file="\Temp\Test XML Data.xml"
		         validation="none"
		         processedInputFilesVariable="toExcel"
		         version="1.0"
		         logLevel="debug">
			<rowset name="data">
				<column index="1"
				        value="/ns0:Study/ns0:StudyNum"
				        name="StudyNum" />
				<column index="2"
				        value="/ns0:Study/ns0:InformationContained"
				        name="InformationContained" />
				<column index="3"
				        value="/ns0:Study/ns0:StudyRowId"
				        name="StudyRowID" />
			</rowset>
		</xmlRead>
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
Post Reply