stuck trying to put elements from xml file into an array! HELP

here’s my xml doc:

<imageinfo>
    <image>

        <imageid> 1</imageid>

        <address>528985_3305911564359_1378183915_n.jpg</address>

        <canvas>1</canvas>

    </image>
  <image>

        <imageid>2</imageid>

        <address>IMAG.jpg</address>

        <canvas>2</canvas>

    </image>
    <image>
        
	<imageid>3</imageid>

        <address>IMAG0.jpg</address>

        <canvas>3</canvas>

    </image>

</imageinfo>

and my javascript code:

var xml = new XmlDocument();
xml.Load("C://Unity Files/WEBSITE/gallerySite/images2.xml");

var imageInfo = new Array();
var root  = xml.DocumentElement.GetEnumerator();


while(root.MoveNext()){

imageInfo.Add(root.Current.Item["imageid"].InnerText);
imageInfo.Add(root.Current.Item["address"].InnerText);
imageInfo.Add(root.Current.Item["canvas"].InnerText);


}

the error i am getting is ‘Item’ is not a member of ‘object’

please help me. any suggestions would be great to put me in the right direction!

Look at this: Unity Noobs: XML - Loading data from a xml file.

Basically you want to fetch the “image” elements explicitly and iterate over the results.