How to read string from XML file?

I have used this simple script on a plane to show the image from the respective url

// Get the latest webcam shot from outside "Friday's" in Times Square var url = "http://images.earthcam.com/ec_metros/ourcams/fridays.jpg"; function Start () { // Start a download of the given URL var www : WWW = new WWW (url);

// Wait for download to complete yield www;

// assign texture renderer.material.mainTexture = www.texture; }

i want to change the url from runtime webplayer , what i want to do is , i want this url to be called in an xml which is kept along with the webplayer in the same folder.....

what to do ?

If i understand correctly you want to change the url from a xml file so when you run the game it will load a url from the xml file. It might be easier to use a plain txt file and load that into the url variable if you only need one url that is.

// Get the latest webcam shot from outside "Friday's" in Times Square
var url = "http://mywebsite.com/pathname/textfile.txt"; 
function Start () { 
// Start a download of the given URL 
var www : WWW = new WWW (url);
// Wait for download to complete 
yield www;
// assign texture
renderer.material.mainTexture = www.texture; 
}

Then your textfile.txt would have just this url http://images.earthcam.com/ec_metros/ourcams/fridays.jpg

If you need multiple urls you could still use the text file and then put multiple urls inside, then in unity you could write a script that would load up the one you needed:if you go that route look into using Arrays they are useful.

Array Documentation: http://unity3d.com/support/documentation/ScriptReference/Array.html