STring Manipulation Required

Suppose I have the below string
“Name= “dgdg” Age=“66” Area=”" Country=“Dubai”

I have to remove the attribute which is empty or blank. In this case Area="" should be remove as it contains nothing

Hi @Sana_Afreen ,

Is your string a Json?

If so, I believe the best approach would be to deserialize id by using the Deserialize Json activity https://docs.uipath.com/activities/docs/deserialize-json and, afterwards to check the attribute of each propriety …

Best regards,
Marius

string is xml

if string is XML then it is recommended to do it with the XML related APIs. May we ask you to share some sample xml with us. Thanks

I need to create a XML in which any attributes values which is null should be removed.I am fetching values from Database and passing it as string.format using assign activity and saving it as.xml. So I need to save only those attributes which has values in it.