public void ToXml(MyXmlWriter w)
 {
     w.WriteElementWithAttributes("Property", string.Format("name=\"{0}\" value=\"{1}\"", name, propValue));
 }
 public void WriteXmlFile(string path)
 {
     MyXmlWriter w = new MyXmlWriter(path);
     ToXml(w);
     w.Close();
 }
 // Xml Machinery
 public void ToXml(MyXmlWriter w)
 {
     w.WriteStartElement("AssetFile");
     w.MaybeOutAttribute("TargetFile", targetFile);
     w.MaybeOutAttribute("NewFileName", newFileName);
     w.MaybeOutAttribute("FileType", CompressedFileEnumName(fileTypeEnum));
     w.WriteEndElement("AssetFile");
 }
 public void ToXml(MyXmlWriter w)
 {
     w.WriteStartElement("AssetDefinition");
     w.MaybeOutAttribute("Name", name);
     w.MaybeOutAttribute("Description", description);
     w.MaybeOutAttribute("Category", category);
     w.MaybeOutAttribute("Type", AssetTypeDesc.AssetTypeEnumName(typeEnum));
     if (status != AssetStatusEnum.Complete)
         w.MaybeOutAttribute("Status", AssetTypeDesc.AssetStatusEnumName(status));
     w.MaybeOutAttribute("Breakage", breakage);
     w.WriteStartElement("Files");
     foreach (AssetFile file in files)
         file.ToXml(w);
     w.WriteEndElement("Files");
     if (properties.Count > 0) {
         w.WriteStartElement("Properties");
         foreach (AssetProperty property in properties)
             property.ToXml(w);
         w.WriteEndElement("Properties");
     }
     w.WriteEndElement("AssetDefinition");
     return;
 }