bring the attributes into the gameobject from xml file

Hi I just started learn unity and i had some problem regarding xml file.
I have a existing xml file with the following:


goName = “Cube”
StartPosX = “0” StartPosY = “0” StartPosZ = “0”
EndPosX = “5” EndPosY = “5” EndPosZ = “5”
speed = “5.0f”

I have load the xml into the resources folder in my asset folder and is able to read it. how do I extract the information such that the cube will start moving at the speed of 5.0f towards the given coordinates?

If you’ve got this xml as string variable you can use XmlDocument class to load and parse it (documentation see here: XmlDocument Class (System.Xml) | Microsoft Learn).

UPD.: There are some different ways to parse xml with this class, a one of them is used XPath expressions, it is discribed here: XmlNode.SelectNodes Method (System.Xml) | Microsoft Learn