I have the following xml tag (I'll summarize it for size):
<docZip schema="procNFe_v3.10.xsd" NSU="000000000001868">H4sIAAAAAAAEAN1aWY+jyLJ+Pv..bla bla bla</docZip>
The field type is base64Binary, it is a Gzip file.
I have already reviewed the internet looking for a way to "read" the XML and get this tag and generate the Gzip file that is contained in it.
How do I get this tag that is in base64Binary and generate the file it contains?
I tried this example code with no success:
using System;
using System.Text;
public class Base64Decoder
{
public static void Main ()
{
string inputText = "This is some text.";
Console.Out.WriteLine ("Input text: {0}", inputText);
byte [] bytesToEncode = Encoding.UTF8.GetBytes (inputText);
string encodedText = Convert.ToBase64String (bytesToEncode);
Console.Out.WriteLine ("Encoded text: {0}", encodedText);
byte [] decodedBytes = Convert.FromBase64String (encodedText);
string decodedText = Encoding.UTF8.GetString (decodedBytes);
Console.Out.WriteLine ("Decoded text: {0}", decodedText);
Console.Out.Write ("Press enter to finish.");
Console.In.ReadLine ();
return;
}
}