5
Sto utilizzando l'ultima versione di DotNetZip e ho un file zip con 5 XML.
Voglio aprire lo zip, leggere i file XML e impostare una stringa con il valore dell'XML.
Come posso fare questo?Come utilizzare DotNetZip per estrarre il file XML da zip
Codice:
//thats my old way of doing it.But I needed the path, now I want to read from the memory
string xfile = System.IO.File.ReadAllText(strNewFilePath, System.Text.Encoding.Default);
using (ZipFile zip = ZipFile.Read(this.uplZip.PostedFile.InputStream))
{
foreach (ZipEntry theEntry in zip)
{
//What should I use here, Extract ?
}
}
Grazie
Grazie Carson, che funziona per me. Stavo usando l'Estratto ma non con il flusso, ancora. – Bruno
Ho saltato ms.Position = 0; Funziona benissimo grazie :) –