/// <summary> /// Writes the outer XML content of this node. /// </summary> /// <param name="xmlWriter">The XML writer to write to.</param> public void WriteOuterXml(XmlWriter xmlWriter) { if (xmlWriter == null) throw new ArgumentNullException("xmlWriter"); Check(); using (XmlWriterSerializer serializer = new XmlWriterSerializer(xmlWriter, false)) { ANode.serialize(serializer); } }
/// <summary> /// Writes the inner XML content of this node. /// </summary> /// <param name="xmlWriter">The XML writer to write to.</param> public void WriteInnerXml(XmlWriter xmlWriter) { if (xmlWriter == null) throw new ArgumentNullException("xmlWriter"); Check(); using (XmlWriterSerializer serializer = new XmlWriterSerializer(xmlWriter, false)) { foreach (ANode node in EnumerateANodes(ANode.children())) { node.serialize(serializer); } } }