public virtual void ToXml(XmlElement xmlEle, IXmlContext cnt) { XmlElement _infoEle = cnt.ToXml(_mkaInfo); XmlElement _formatEle = cnt.ToXml(_mkaInfo.Properties); xmlEle.AppendChild(_infoEle); xmlEle.AppendChild(_formatEle); }
void IXmlable.ToXml(XmlElement xmlEle, IXmlContext cnt) { foreach (DrawObject obj in _mokkanObjList) { XmlElement objEle = cnt.ToXml(obj); if (null != objEle) { xmlEle.AppendChild(objEle); } } }
public void Save() { try { // Serialize object to xml format XmlDocument doc = new XmlDocument(); IXmlFormatter formatter = FepXmlableFactory.CreateXmlFormatter(); IXmlContext cnt = FepXmlableFactory.CreateXmlContext(formatter, doc); doc = cnt.Document; XmlDeclaration xmldecl = doc.CreateXmlDeclaration("1.0", null, null); XmlElement _eleBat = cnt.ToXml(this); doc.AppendChild(_eleBat); doc.InsertBefore(xmldecl, doc.DocumentElement); doc.Save(BatFilePath); } catch (System.Exception ex) { MessageBox.Show(Owner, MkaMessage.ErrSaveFile); _log.Error(MkaMessage.ErrSaveFile, ex); } }