Gameobject Position to XML

Hi, I created a empty gameobject that stores all 4 sphere in it.
How do I place all 4 sphere position into a XML file?

Currently I am able to read the 4 sphere position

 foreach (Transform child in Root.transform)
    Debug.Log(child.transform.position);

Than I create a new XML file
// Create subfolder

        System.IO.Directory.CreateDirectory(Directory.GetCurrentDirectory() + @"/Assets");
		
		// Declaration
		XmlDeclaration dec = xmlDoc.CreateXmlDeclaration("1.0", null, null);
		xmlDoc.AppendChild(dec);
		
		// Create the root element
		XmlElement root = xmlDoc.CreateElement("Vechicles");
		xmlDoc.AppendChild(root);
		
		xmlDoc.Save(filepath);
		
		Debug.Log("File Created");

How do I store the 4 sphere position into the newly created XML file?

Wrap it up into a serializable class.

[System.Serializable]
public class MyPositions
{
    public Vector3[] positions;
}

Hi I’m not too sure how the serialization works. I tried the following but it gave me error

public GameObject Root = null;

public class MyPositions
{
	public Vector3[] positions;
}	

// Use this for initialization
void Start () 
{
	SerializeToXML();
}

public void SerializeToXML(MyPositions position)
{
	XmlSerializer serializer = new XmlSerializer(typeof(MyPositions));
	TextWriter textWriter = new StreamWriter(@"C:\Position.xml");
	serializer.Serialize(textWriter, position);
	textWriter.Close();
	Debug.Log("okay");
}