Problem statement — We need to extract book details from the XML data where the genre is ‘fantasy’
Book.XML
Import system.xml and system.xml.linq to the project.
Now, add 2 assign activities to the workflow area and write the following code.
This will load the xml and save it into element of ‘XElement’ type
The above query will get the data based where ‘Genre’ Value in ‘Fantasy’ and will store in an IEnumerable
Let’s run it and see the live action
YouTube: How to get elements having specific attribute from XML using LINQ(Where clause in xml) - YouTube
Happy Automation