I am probably missing the boat here, but how can you build a reusable tool that uses the XML Type Provider if the XML you are giving to XMLProvider doesn't have all of the possible elements? In other words, is there any way to use an XSD? I know I could try to generate sample XML from an XSD but I'm wondering if I am approaching this incorrectly.
14
votes
Have a look at this issue - github.com/fsharp/FSharp.Data/issues/57? It is work in progress at the moment.
- weismat
Thx for that head's up.
- user3410575
There's now a branch of FSharp.Data with work on adding XSD-parsing functionality to XmlProvider. There is also a separate project, in early alpha stages, to do the same thing. (The author created it as a separate project so as not to interfere with the XsdProvider branch). I've used the separate project in a proof-of-concept project, and it worked for me, though I'm sure there are still plenty of bugs to find. But you could give that a try.
- rmunn
this separate project is now sufficiently complete and stable (disclaimer: I am the author)
- Giacomo Citi
@GiacomoCiti Tried your 1.0 version.. and it appears to fail silently (in fsx file, using a collada 1.5 schema from there: khronos.org/collada with a blender exported .dae xml file). Cannot even access the first node. :(
- BitTickler
1 Answers
0
votes
FSharp.Data.Xsdaugments the XML type provider ofFSharp.Datawith schema support.
https://fsprojects.github.io/FSharp.Data.Xsd/