Error using xml files

Hello community
I would like you to help me with the following problem.
I have to manipulate an invoice in xml format and I have tried to do it with the deserialize activities but I cannot capture the values found in the tags. It generates this error message "Message Box: Object reference not set to an instance of an object . "



first check: output variable from deserialize XML is correct used and not null

further checks:
check if namespace are defined within XML which is to handle additional for the retrieval.

  • just open the XML and check for any xmlns attributes
  • go to watch /immediate panel while debugging and type in after deserializing xml


in case of the name looks like {NamespaceValue}YourRootLocalName then it has Namespaces defined.

Checking Elements more deep in the tree can be done by following:

For an initial handling of namespaxe in XML have a look here:

1 Like


thanks for your answer according to what I understand you correct me if I am wrong when entering “xDoc.Root.Name”
it gave me the following result


But in the list it does not show me any field appears in 0

I just fixed it, thank you very much for your help, it was great

ensure that nsCase is of datatype XNamespace and under default value the namespace value is entered

Analyse it further with the YourXDocVar.Root.Descendants(YourElementIndexInTheTree).Name trick and enter the index of 1 NomItem

1 Like

Ok if I was reviewing it and I found the bug I will review what you tell me about it and again thanks for your help

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