Beispiel #1
0
        public override string ReadOuterXml()
        {
            StringWriter sw = new StringWriter();

            XmlWriterSettings ws = new XmlWriterSettings();

            ws.Indent = true;
            using (XmlWriter xw = XmlWriter.Create(sw, ws))
            {
                xw.WriteNode(this, true);
            }

            return(sw.ToString());
        }
Beispiel #2
0
        public override string ReadInnerXml()
        {
            StringWriter      sw = new StringWriter();
            XmlWriterSettings ws = new XmlWriterSettings();

            ws.Indent = true;
            using (XmlWriter xw = XmlWriter.Create(sw, ws))
            {
                while (!this.EOF && this.NodeType != XmlNodeType.EndElement)
                {
                    xw.WriteNode(this, true);
                }
            }
            return(sw.ToString());
        }
 public override void WriteNode(XmlReader reader, bool defattr)
 {
     _writer.WriteNode(reader, defattr);
 }