I would like to know if it is possible to make a complete consultation of the NFe of the Federal Revenue, even though it is not the issuer or the recipient of the NF.
I need this because I get some XML from NFe and I need to validate if this XML has the same information as the IRS, to verify that it has not been manipulated, and my CNPJ is not part of this NFe. I know it's possible to do via DOM, but I consider it a gambiarra and something that may not be 100% stable / reliable.
I even analyzed all the manuals of the Internal Revenue Service, but I did not identify any possible solutions.
I saw that there are some companies that provide this type of query as a service, and I believe they do not do this via DOM.