예제 #1
0
        public void ReadStringElement()
        {
            var RawXML = @"
<Test>
	<Text>TestText</Text>
</Test>";

            var MySection = StringElementSection.FromString(RawXML);

            Assert.AreEqual("TestText", MySection.Text.Content);
        }
예제 #2
0
            public static StringElementSection FromString(string rawXml)
            {
                using var MyStream = new StringReader(rawXml);
                using var MyReader = XmlReader.Create(MyStream);

                MyReader.Read();

                var MySection = new StringElementSection();

                MySection.DeserializeSection(MyReader);

                return(MySection);
            }