I'm trying to read an xml file which I plan to include as part of my mobile application. I've created a folder called "XML" and added a file called "test.xml". The files build action is set to content. When I run the app it crashes on trying to find the file. Here is the code I'm using:
_path = "XML/test.xml";
doc = new XmlDocument();
doc.Load(_path);
Here is the error I get:
System.IO.DirectoryNotFoundException has been thrown.
Could not find a part of the path "/XML/test.xml"
Do I need to register the directory/folder somehow? Thanks for any advice, I'm sure I've just missed something simple...