Hi Naveen,
You can get the child element counts from this XML once you pull the source code from the web page like what you've provided using 'Utility - XML' VBO which is available in the VBO folder of your Blue Prism installation folder.
First you need to use the 'Get Elements By XPath' action by passing the XML input along with the XPath expression:
"//div[@class=" & """" & "tbody" & """" & "]"
(in case you are setting it via Blue Prism). If you are setting it as an initial value in some data item and passing it then use:
//div[@class="tbody"]
.
This action will give you a collection let say, 'Elements' consisting of child element details within div tags having the class attribute as 'tbody'. Next, you can loop within the collection and then again use 'Get Elements By XPath' action with the XML input as
"div" & [Elements.Inner XML] & "/div"
and XPath expression as
"//div"
and store the value in a collection called 'Sub Elements'.
Now you need to loop within 'Sub Elements' collection and increment the count value. The initial value of this count value should be 0.
By the end of the entire workflow, it will return you the total child count.
Below is the sample workflow:
------------------------------
----------------------------------
Hope it helps you and if it resolves you query please mark it as the best answer so that others having the same problem can track the answer easily
Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
Wonderbotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website:
https://devneet.github.io/Email: devneetmohanty07@gmail.com
----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.