RPA - Get Value of Tags of XML Invoice

Hi,

Someone can help me read and get value of some tags of this XML file?

When i try get the valeu of tag, this exception occur:
RemoteException wrapping System.NullReferenceException: Object reference not set to an instance of an object.

image

XMLTeste.xml (7.5 KB)

@LuizSilva
pay attention on the namespace definitions in the XML file (2nd, 3rd Element). This has risk that your Xpath will not work as expected

See a similiar Topic here

You can go for the local names but I would suggest to you following:

  • output the element name for 2 element with the name() function to see how the full name is about
  • try to get the namespace poperly configured with the help of namespace manager
1 Like

Thanks you! Help me a lot!

Do you know if i get convert this XML in a CSV or XLSX?

@LuizSilva
I would not suggest to shift away from XML due this situation. Youd can do one thing:
remove in the XML the namespace definitions: xmlns="http://www.portalfiscal.inf.br/nfe
then you can start with exploring XML Processing (directly as above no more need for the localname workaround)

Getting this Namespce thing solved can so be delayed. Community is at your side

1 Like

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