Code:
/* Append a Point2 value to 
 * the tree
 */
void stick(wptree& tree, std::wstring location, Point2 p)
{
	MCHAR finalLocations[100];
	std::wstring alocation(_T(".vector"));
	//wptree& ret = tree.put(location, "");
	
	for (int i = 0; i < 2; i++)
	{
		 
		float f; 

	
		wcscpy(finalLocations, location.c_str());
		wcscat(finalLocations, alocation.c_str());
		 
		switch (i)
		{
		case 0:
			wcscat(finalLocations, _T(".x"));
			
			f = p.x;
			break;
		case 1:
			wcscat(finalLocations, _T(".y"));
			f = p.y;
			break;
		}
			 
		tree.add(finalLocations, f);
		
	}
	//return ret;
}
Code:
<TexCoords>
                <vector>
                    <x>1</x>
                    <y>1</y>
                    <x>1</x>
                    <y>0</y>
How can I make the xml look like this
Code:
<TexCoords>
                <vector=1>
                    <x>1</x>
                    <y>1</y>
                <vector=2>
                    <x>1</x>
                    <y>0</y>