Exemple #1
0
        public void Setup()
        {
            MemoryStream ms  = new MemoryStream();
            XmlDocument  doc = new XmlDocument();

            doc.Load(new StringReader("<Customer><Name>Chris</Name></Customer>"));

            XmlWriter writer = XmlWriter.Create(ms);

            doc.WriteTo(writer);
            writer.Flush();
            ms.Position = 0;

            inputStream = ms;

            attr = new XmlBindAttribute();
        }
Exemple #2
0
        public void Setup()
        {
            MemoryStream ms  = new MemoryStream();
            var          doc = new XDocument(
                new XElement("Customer",
                             new XElement("Name", "Chris")));

            var writer = XmlWriter.Create(ms);

            doc.WriteTo(writer);
            writer.Flush();
            ms.Position = 0;

            inputStream = ms;

            attr = new XmlBindAttribute();
        }