XmlDocument not parsing xml file on web player or app, but works on editor

I’m not sure what’s happening. I’ve a xml file in the resources folder, which is properly loaded with Resources.Load:

TextAsset dialog = (TextAsset)Resources.Load ("bedroomDialog");
currentDialog.LoadXml (dialog.text); //currentDialog is XmlDocument

dialog.text does contain the xml code, and when I parse it while on the editor, it all works flawlessly.

But when I build a webplayer version, or a macOS or Windows app, LoadXml does not work. The xml text, however, has been properly loaded, I see it on screen. But LoadXml seems unable to parse it.

Any clue? :frowning:

Ok. I struggled with this like two hours before posting… and two minutes later I find the solution - at least for non-webplayer executables. In the Api Compatibility Level, .NET 2.0 must be selected (not the subset).

Is there a workaround for the webplayer?

bedroomDialog.xml is placed in Resources folder?

For the webplayer you can load it from server, or get via client-side javascript. XmlDocument class should work as well as in stanalone app, I used it many times in webplayer.