Filter XML using Lambda expression in uipath

Hello All,
I am trying to filter 2 xmls and compare them if the given string exist or not in xml descendent. Below are my 2 xmls

xml_1
[
p1:rPr
<p1:rFonts p1:hAnsi=“Times New Roman” />
<p1:b />
</p1:rPr>
p1:tstatement</p1:t>
]

xml_2
[
p1:rPr
<p1:rFonts p1:hAnsi=“Times New Roman” />
<p1:vertAlign p1:val=“superscript” />
</p1:rPr>
p1:tB.C.</p1:t>
]

in these xml, I want to compare if descendant of any xml contain superscript or not?

please use </> format button from editor. We cannot see the XML. But also bette when will share the file with us.

For doing a filtering / processing we have to handle the namespaces (we do see the p1 prefix)
#Visual

Checking if an XML element with particular value is present we can try following
YourXDocumentVar.Descendats().Any(Function (x) x.Value.Trim.toLower.Equals("superscript"))

Thank @ppr for the solution. It is working fine now.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.