Exemple #1
0
        public void ReadCustomTextElement()
        {
            var RawXML = @"
<Test>
	<Text Value=""10"">TestText</Text>
</Test>";

            var MySection = CustomTextElementSection.FromString(RawXML);

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

                MyReader.Read();

                var MySection = new CustomTextElementSection();

                MySection.DeserializeSection(MyReader);

                return(MySection);
            }