private static void SaveFacet(Facet facet, XmlTextWriter writer) { writer.WriteStartElement("Facet"); writer.WriteStartAttribute("name"); writer.WriteValue(facet.Name); writer.WriteEndAttribute(); foreach (Region r in facet.Regions) SaveRegion(r, writer); writer.WriteEndElement(); }
protected static void LoadFacet(Facet f, XmlElement xml) { foreach (XmlElement xmlReg in xml.SelectNodes("region")) { f.Regions.Add(LoadRegion(xmlReg)); } }