Does Deserialize Contain XML Value?

In the loop, I update the value I read from the excel cell in xml. But I need help on how to check if the data I read from excel cell is the value sought in xml.

For example, the XML code below does not contain the <“test”> tag. I want to check if it contains <“test”> tag.

<?xml version="1.0" encoding="ISO-8859-9"?>
                        xmlns:xsi="6666" xsi:type="7777">
                        <nameSurname>dddddd eeeee</nameSurname>
1 Like

Hi @ridvanucok ,

If you want to find if text exists in particular contest or not, you can use Is Match? activity and you will get output as Boolean.


1 Like

Hey @ridvanucok

You can do it in two ways,

  1. String contains

  2. XML namespace contains

Hope this helps


1 Like

we would recommend to do a first check on only local name. So we do not have handle unknown namespaces.

xdoc.Descendants().Any(Function (x) x.Name.LocalName.tolower.equals(strElementNameVar.toLower))


I am working with function for the first time. What is the reason for the error here?

would you be so kind and share the validation message with us. Thanks

1 Like

I shared the validation message. Thanks for your help.

I updated the variable type to boolean and updated the name of the variable specified as xdoc to my code. @ppr Thank you very much for your help.

xd_Data.Descendants().Any(Function (x) x.Name.LocalName.tolower.equals(str_Deger.ToString.toLower))

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