Sage.Configuration.LocaleInfo.ToXml C# (CSharp) Method

ToXml() public method

public ToXml ( XmlDocument document ) : XmlElement
document System.Xml.XmlDocument
return System.Xml.XmlElement
        public XmlElement ToXml(XmlDocument document)
        {
            const string Ns = XmlNamespaces.ProjectConfigurationNamespace;
            XmlElement result = document.CreateElement("locale", Ns);
            XmlElement formatElem = result.AppendElement(document.CreateElement("format", Ns));

            result.SetAttribute("name", this.Name);
            result.SetAttribute("language", this.Language);
            result.SetAttribute("dictionaryNames", string.Join(",", this.DictionaryNames));
            result.SetAttribute("resourceNames", string.Join(",", this.ResourceNames));

            formatElem.SetAttribute("culture", this.Culture.Name);
            formatElem.SetAttribute("shortDate", shortDateFormat);
            formatElem.SetAttribute("longDate", longDateFormat);

            return result;
        }