public void ReadStringElement() { var RawXML = @" <Test> <Text>TestText</Text> </Test>"; var MySection = StringElementSection.FromString(RawXML); Assert.AreEqual("TestText", MySection.Text.Content); }
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); }