XmlException is thrown when importing documents containing DAT files.
Workaround:RadFlowDocument flowDocument;
using (Stream str = new FileStream("input.docx", FileMode.OpenOrCreate))
{
MemoryStream ms = new MemoryStream();
str.CopyTo(ms);
ms.Seek(0, SeekOrigin.Begin);
using (ZipArchive archive = ZipArchive.Update(ms, null))
{
var zipEntries = archive.Entries;
// Skip glossary on importfor (int i = zipEntries.Count() - 1; i >= 0; i--)
{
var entry = zipEntries.ElementAt(i);
string entryName = entry.FullName;
if (Regex.IsMatch(entryName, @"\[trash\]"))
{
entry.Delete();
}
}
}
}