0

I have an .odt wordprocessing file, to be processed with libre office or Word, and I need to replace a bunch (20+) of strings in the text with other text. I know an .odt file is really a .zip file, containing .xml files and that i need to access content.xml. Do I unzip the content.xml to a stream, deserialize that and use LINQ or something? Or is there an easier way, using some ready-made library?

Broots Waymb
  • 4,713
  • 3
  • 28
  • 51
Erik
  • 894
  • 1
  • 8
  • 25

1 Answers1

1

If you're using .Net 4.5 you can make use of the new System.IO.Compression namespace. There are a couple articles out there on how to do it. Here's one http://www.codeguru.com/csharp/.net/zip-and-unzip-files-programmatically-in-c.htm which I've found useful.

P. Hinker
  • 299
  • 2
  • 7