- Home /
Load from Xml on Iphone and Android
Hi,
i am trying to load data from xml file stored in Assets/Resources/ on iPhone, but with no luck so far. I was looking into several other similar topics, but none of them realy helped in any way. So let me ask again for some direct guide how to make work xml on Iphone and Android for someone who has very little experience with xml.
On Mac it works without any issues.
Code to get the xml:
string filepath = Application.dataPath + "/Resources/gamedata.xml";
XmlDocument myXml = new XmlDocument();
xmlDoc.Load(filePath);
Error :
Directory not found exception : Cound not find a part of the path "/var/mobile/Applications/86D...../Game.app/Data/Resources/gamedata.xml".
Thanks for any help
Answer by cowlinator · Feb 13, 2013 at 12:49 AM
put the XML file in a folder called "Resources". then use Resources.Load(path), where the root of path is the resources folder.
Answer by DaveA · Aug 19, 2012 at 09:44 PM
Make sure your Player Settings have .NET 2.0, not .NET 2.0 Subset
Your answer
Follow this Question
Related Questions
Load Xml on Android with XmlReader 2 Answers
Save and Load data from Local XML file won't work 1 Answer
The best way to save and load data for mobile in unity ? 1 Answer
How to load XML on Android 1 Answer
How do I read XML on iOS? 2 Answers