public XmlNode ToXml(XmlNode parent) { XmlNode result = parent.OwnerDocument.CreateNode(XmlNodeType.Element, "Update", string.Empty); // child nodes XmlNode nodTarget = parent.OwnerDocument.CreateNode(XmlNodeType.Element, "targetHref", string.Empty); nodTarget.InnerText = TargetHref; result.AppendChild(nodTarget); if (null != _change) { result.AppendChild(_change.ToXml(result)); } if (null != _create) { result.AppendChild(_create.ToXml(result)); } if (null != _delete) { result.AppendChild(_delete.ToXml(result)); } return(result); }