private void SaveVsaEngineState(XmlDocument project, XmlElement parent){
XmlElement engine = project.CreateElement("VsaEngine");
// add IVsaEngine properties as attributes
this.CreateAttribute(project, engine, "ApplicationBase", this.applicationPath);
this.CreateAttribute(project, engine, "GenerateDebugInfo", this.genDebugInfo.ToString());
this.CreateAttribute(project, engine, "Language", this.scriptLanguage);
this.CreateAttribute(project, engine, "LCID", this.errorLocale.ToString(CultureInfo.InvariantCulture));
this.CreateAttribute(project, engine, "Name", this.engineName);
this.CreateAttribute(project, engine, "RootNamespace", this.rootNamespace);
this.CreateAttribute(project, engine, "Version", this.assemblyVersion);
this.SaveCustomOptions(project, engine);
this.SaveVsaItems(project, engine);
parent.AppendChild(engine);
}