I have some Xml with one of the nodes as follows:
<code>23</code>
FSharp.Data correctly infers the type of "Code" to be an option int. My problem is when the node is empty as follows:
<code />
I get the following exception
Value is missing at <StartupCode$FSharp-Data>.$TextRuntime.GetNonOptionalValue@109-4.Invoke(String message) in C:\Git\FSharp.Data\src\CommonRuntime\TextRuntime.fs:line 109
Is there any way I can get back Option.None instead of it throwing an exception?
EDIT: For types inferred as option string this works as expected.
and not existing and the "illegal"
(ok that depends on a lot but still). Finer info at http://stackoverflow.com/questions/3760629/whats-the-difference-between-a-element-and-a-element-xsinil-true This then again have implications when inferring stuff from XML... – Helge Rene Urholm Jul 01 '15 at 09:25