XmlElement newSql = xmlDoc.CreateElement(obj.GetType().Name);
//scon is a XML element
//I am getting the attribute list of the element
//pi array takes the attributes of the scon XML element
PropertyInfo[] pi = scon.GetType(.GetProperties();
P
for (int i = 0; i < pi.Length; i++)
{
//I want to create objects automatically from the vales within the pi array !!! XmlElement PropertyList[i] = xmlDoc.CreateElement(pi[i].ToString()); }