title: How to load an XDocument preserving `\r\n`
body: <p>A <code>var doc = XDocument.Parse(&quot;&lt;r&gt;a\r\nb&lt;/r&gt;&quot;)</code> and then <code>doc.Root.Value</code> gives me <code>a\n\b</code> instead of the expected <code>a\r\nb</code>. I tried most of the <code>Parse</code> and <code>Load</code> overloads, using <code>XmlReader</code>, <code>Stream</code>, <code>TextReader</code>, but didn't manage to load the <code>\r\n</code> as <code>\r\n</code>; I always get a <code>\n</code>. I'm using .NET 6 on Windows.</p>
  <p>There is this <a href="https://stackoverflow.com/questions/6413035/preserve-r-n-on-xelement-load">question about XElement.Load</a> with an answer suggesting to use <code>LoadOptions.PreserveWhitespace</code>, but this doesn't work for me when using <code>XDocument.Load</code> or <code>XDocument.Parse</code>.</p>
  <p>How can I load an XML document containing a <code>\r\n</code> in a value into an <code>XDocument</code> preserving that <code>\r\n</code>?</p>