How to read xml file on Android using www and StreamingAssets?

For my Android game, I’m trying to read (and eventually write) to xml file. To do that, I’m using a StreamingAssets folder that I created in the Assets folder.

The main source of information are those from Unity doc:

I tried many different paths and setting (External SDCard and Internal Only). I searched a lot for solution, but without success.

On my Android Nexus 7 tablet in my try catch I get: System.Xml.XmlException: Document element did not appear. Line 1, position1.

Line 1 of my xml file is the basic xml version=“1.0” encoding=“ISO-8859-15”.
If I change the file name to something inexistent, I get the same exception.

This is my current cleaned code:

//OurText inherits from MonoBehaviour.
//Text is inherited.
public class TextMainMenuLineTwo : OurText
	protected override void Start ()
		StartCoroutine( Init() );
	public IEnumerator Init()
		string file;
		string fileName;
		WWW www;
		XmlDocument xmlDocument;
		file = "Texts.xml";
		fileName = "jar:file//" + Application.dataPath + "!/assets/" + file;
		www = new WWW(fileName);
		yield return www;
		xmlDocument = new XmlDocument();
			Text = xmlDocument.SelectSingleNode ("texts/mainMenuTitle").InnerText;
		catch(Exception e)
			Text = e.ToString();

Thank you all.

Well you need to use:

   fileName = Application.streamingAssetsPath + "/" + file;

There’s no “dataPath” in that.

You cannot write to StreamingAssets only read from there. One trick is to copy all of the files from StreamingAssets to persistentDataPath and read/write everything to there.

please make simple example because i test all ways even what u say about reading Streaming Assets folder by www class but it does not work,then please make a simple program in unity and release it as soon as it possible (I want to read MSacess file in unity)i download 3 sample thorough internet but all of them does not work correctly