How Do I Find an Element within another Element from XML using LINQ in UiPath

Problem statement — Problem statement — We have an XML data file and need to retrieve employees live in ‘Montara’ city which is a nested element

Import system.xml and system.xml.linq to the project.

Now, add 2 assign activities to the workflow area and write the following code.

Query to Load xml file

Query to find the employee lives in Montara

Let’s run the code and see the action

YouTube: How to find an Element within another Element from XML using LINQ in UiPath - YouTube

Medium: How Do I Find an Element within another Element from XML using LINQ in UiPath - Manoj Batra - Medium

Code: UiPathSamples/16 - Find an element within another element at main · manojbatra071/UiPathSamples · GitHub

Happy Automation