Situation 1: When Root element have the attribute and I want to access the element down below I am getting error: “Object reference not set to an instance of an object.”
In below example: xmlns=“somedata” in instruction element.
XMLFile.Element(“instruction”).Element(“header”).Element(“interchangeid”).Value this is giving error.
Situation 2: When I remove the attribute xmlns=“Somedata” from instruction. Then no error.
I need help on Situation 1, on how to fix the error.
I am using UiPath.Web.Activities 1.4.5
@navin.singh
it looks like your XML has defiend a namespace (somedata, but ensure the value somedata is accepted as a valid namespace or edit it accordingly) and therefore you cannot work with local name only.
test it with a log message and yourXDocVar.Root.Name.toString