@KMota
While I was working on your issue, you solved by yourself. Great
xpath: “string(//*[local-name()=‘nNF’]/text()[1])” would return the value.
Go on with the API that you currently used in your solution. I feel its easier to use on the start. And you are doing similiar, working with the local name.
And it was the issue with the namespaces.
A namespace let you allow to group elements in so called namespaces. In case you have more namespaces in use and e.g. some elements have the same name e.g. , you can identify those elements by using the namspace into account:
e.g. namspace1 has x: as an alias so element person is identified by x:person
Just in brief: <NFe xmlns="http://www.portalfiscal.inf.br/nfe"> Bold formatted part is defining the namespace, unfortenately with an alias. So option to direct adress nNF were gone.
About namespaces more in detail, come back on a seperate post and we help you.