How to read Xml Data File in Ui Path

i didn’t get you
you want replace the string??
using replace method of String
value.replace(oldvalue,new value)

1 Like

Hi sandeep13 sir,

I want replace the string


This query getting one value That value i replace to some text

1 Like


1 Like

Hi sandeep13 sir,

If I check Particular Element inside particular attributes If it is There means Exit and not There is Insert that values in That Xml file

If It is Possible sir ?

yes you can, you need to explore Add, AddAnnotation method.

Hi sandeep13 sir,

How To add in Particular Element in Add some text I am trying But Not Getting sir


I want to check whether a XML tag/element is present in the XML file or not.
How can i achieve this.

I have read the XML file in to string using Deserilization operation and looped the to get all the similar kind of tags.


I want to check whether this tag is present in the XML file or not.

Kindly help me.


when i use this its showing object reference is not set to an instance of an object.

So i want to check whether this tag is present in the XML or nor before doing further operation.

give a try on check it with the element count like yourXdocVar.Root.Descendants(“reporttype”).toList.Count

If it is not working as expected, so just create a new topic for your case and share some sample xml data with us. We will support you

1 Like

Hello, I ask you, how can I read this xml if the header has an attribute

I have installed only with Electronic Invoice, placing all the text of the label, but it does not work.
What I can do?
I need to extract the name of the issuer

Hi @sandeep13,

I have tried using your methods, that you have mentioned. But the same thing is working when there is no “:” present in xml node.

I have a xml, which is having “:” in the node name. While using this error coming as,

“The ‘:’ character, hexadecimal value 0x3A, cannot be included in a name.”

How to fix this?

For your reference - I have added two Ui Path for your reference.

  • File 01 - Working As there is no “:” in the node name : (14.5 KB)
  • File 02 - Not Working as there is “:” in the node name : (5.1 KB)