XML has Collection and Need Quick Help

I have collection part of XML and need help in understanding how to insert new rows into collection and also how to read collection data from xml.

<field name="message" type="text" value="" />
	<field name="message2" type="text" value="" />
	<field name="MydataInfo" type="collection">
		<row>
					<field name="MyFinance" type="collection">
						<row>
							<field name="JSON:Array" type="collection">
								<row>
									<field name="Finance1" type="text" value="XYZ" />
									<field name="Finance3" type="text" value="$2,500.00" />
									<field name="Finance7" type="text" value="$243,912.00" />
								</row>
							</field>
						</row>
						<row>
							<field name="JSON:Array" type="collection">
								<row>
									<field name="Coverage3" type="text" value="ABC" />
									<field name="Coverage7" type="text" value="$0.00" />
									<field name="coverage9" type="text" value="$0.00" />
								</row>
							</field>
						</row>
						<row>
							<field name="JSON:Array" type="collection">
								<row>
									<field name="Coverage23" type="text" value="hgt" />
									<field name="HDJGHJG35" type="text" value="$0.00" />
									<field name="ETETY56" type="text" value="$500,000.00" />
								</row>
							</field>
						</row>

Hi @Pramodnannaka

You can use the Read text file & Deserialize xml activities to get the data from xml

For ref-

More info-
Activities - Read and Deserialize an XML File (uipath.com)
Hope this helps :slight_smile:

Actually I have already referred this but the formatting is entirely different in my case. So looking for solution to insert new rows data into collection.

please share with us

  • a valid XML Sample / or fragment or Full XML as text file
  • sample of what is to insert and where within the XML
  • expected result sample

with which intention? Looping, value extraction…?

Here we have data in format of collection from row number 4 and under this collection we have multiple rows.

I need help extracting the rows information under collection and also need query to update values to this xml collection based on rows (if gather updated info for collection row1 we should update back to to collection row 1 and if next updated info to 2nd row in same collection)

	<field name="message" type="text" value="" />
	<field name="Screenshot" type="text" value="" />
	
					<field name="ReportInfo" type="collection">
						<row>
							<field name="A" type="text" value="" />
							<field name="B" type="text" value="" />
							<field name="C" type="text" value="" />
							<field name="D" type="text" value="" />
							<field name="E" type="text" value="" />
						</row>
					</field>
					<field name="CorrespondenceForms" type="collection" />
					<field name="XYZInfo" type="collection">
						<row>
							<field name="Code" type="text" value="01" />
							<field name="Name1" type="text" value="INC" />
							<field name="Name2" type="text" value="XYZ" />
							<field name="Address" type="collection">
								<row>
									<field name="Line1" type="text" value="AVE" />
									<field name="Line2" type="text" value="" />
								</row>
							</field>
							<field name="Phone" type="text" value="1234567890" />
							<field name="Fax" type="text" value="1234567890" />
							<field name="cerType" type="text" value="ent" />
						</row>
					</field>
					<field name="MyAddress" type="collection">
						<row>
							<field name="Line1" type="text" value="ST" />
							<field name="Line2" type="text" value="" />
						</row>
			</field>
				
</MyData>