public XmlNode ToXml(XmlDocument xd) { string nodeName = UmbracoSettings.UseLegacyXmlSchema ? "data" : helpers.Casing.SafeAlias(PropertyType.Alias); XmlNode x = xd.CreateNode(XmlNodeType.Element, nodeName, ""); // Alias if (UmbracoSettings.UseLegacyXmlSchema) { XmlAttribute alias = xd.CreateAttribute("alias"); alias.Value = this.PropertyType.Alias; x.Attributes.Append(alias); } x.AppendChild(_data.ToXMl(xd)); return(x); }
public XmlNode ToXml(XmlDocument xd) { XmlNode x = xd.CreateNode(XmlNodeType.Element, "data", ""); // Version not necessary after sql publishing has been removed // Alias XmlAttribute alias = xd.CreateAttribute("alias"); alias.Value = this.PropertyType.Alias; x.Attributes.Append(alias); // Check for cdata section // x.AppendChild(xd.CreateCDataSection(this.Value.ToString())); x.AppendChild(_data.ToXMl(xd)); return(x); }