/// <summary> /// Writes the XML representation of the node to an XmlWriter /// </summary> /// <param name="writer"></param> public void WriteTo(System.Xml.XmlTextWriter writer) { writer.WriteStartElement(this.Name); foreach (string name in this.Attributes.Keys) { writer.WriteAttributeString(name, Attributes[name]); } if (this.TextContent != null) { writer.WriteChars(this.TextContent.ToCharArray(), 0, this.TextContent.Length); } foreach (XmlNode node in this.ChildNodes) { node.WriteTo(writer); } writer.WriteEndElement(); }