Enum FormatDetection
- Namespace
- DocWright
- Assembly
- DocWright.dll
Controls how an input stream is interpreted when loading a mutable DOM document.
public enum FormatDetection
Fields
Auto = 0Auto-detect by sniffing the input stream.
Docx = 1Treat the input as Office Open XML WordprocessingML (.docx).
Doc = 2Treat the input as legacy Word 97-2003 binary (.doc).
Html = 3Treat the input as HTML (.html, .htm, .xhtml).
Rtf = 4Treat the input as Rich Text Format (.rtf).
Markdown = 5Treat the input as Markdown (.md, .markdown).
Text = 6Treat the input as plain text (.txt).
Auto never selects plain text. Every byte sequence is valid plain text, so a sniff that accepted one would claim every input no other reader recognized and turn a corrupt document into mojibake instead of an error. Plain text is reached by this member or by the file extension.