// Constructor public MainPage() { this.InitializeComponent(); XmlSerializerHelperDemo demo = new XmlSerializerHelperDemo(); demo.Start(); string inputString = "This is a test string"; XsdValidator x = new XsdValidator(); //var result = x.Validate("", ""); var serialized = XmlSerializerHelper.Current.SerializeToXml(inputString); var deserialized = XmlSerializerHelper.Current.DeserializeFromXml <string>(serialized); }
public App() { XmlSerializerHelperDemo demo = new XmlSerializerHelperDemo(); demo.Start(); this.MainPage = new ContentPage { Content = new StackLayout { HorizontalOptions = LayoutOptions.Start, VerticalOptions = LayoutOptions.Center, Children = { //new Label { HorizontalTextAlignment = TextAlignment.Start, Text = string.Format("Input: {0}", inputString) }, //new Label { HorizontalTextAlignment = TextAlignment.Start, Text = string.Format("SerializeToXml: {0}", serialized) }, //new Label { HorizontalTextAlignment = TextAlignment.Start, Text = string.Format("DeserializeFromXml: {0}", deserialized) }, } } }; }