public override XmlNode ToXml(XmlNode parent) { XmlNode result = parent.OwnerDocument.CreateNode(XmlNodeType.Element, "IconStyle", string.Empty); base.ToXml(result); //child nodes XmlNode nodScale = result.OwnerDocument.CreateNode(XmlNodeType.Element, "scale", string.Empty); nodScale.InnerText = Scale.ToString(); result.AppendChild(nodScale); XmlNode nodHeading = result.OwnerDocument.CreateNode(XmlNodeType.Element, "heading", string.Empty); nodHeading.InnerText = Heading.ToString(); result.AppendChild(nodHeading); if (null != _icon) { result.AppendChild(_icon.ToXml(result)); } if (null != _hotSpot) { result.AppendChild(_hotSpot.ToXml(result)); } return(result); }
public override XmlNode ToXml(XmlNode parent) { // add the feature stuff base.ToXml(parent); // child nodes if (null != Colour) { XmlNode nodColour = Colour.ToXml(parent); parent.AppendChild(nodColour); } XmlNode nodDrawOrder = parent.OwnerDocument.CreateNode(XmlNodeType.Element, "drawOrder", string.Empty); nodDrawOrder.InnerText = DrawOrder.ToString(); parent.AppendChild(nodDrawOrder); if (null != _icon) { parent.AppendChild(_icon.ToXml(parent)); } return(null); }