diff --git a/snippets/csharp/System.Xml/XmlDocument/Overview/xmlhelpermethods.cs b/snippets/csharp/System.Xml/XmlDocument/Overview/xmlhelpermethods.cs index 285edb42c6f..ba6701b037e 100644 --- a/snippets/csharp/System.Xml/XmlDocument/Overview/xmlhelpermethods.cs +++ b/snippets/csharp/System.Xml/XmlDocument/Overview/xmlhelpermethods.cs @@ -45,10 +45,24 @@ public XmlDocument LoadDocument(bool generateXML) //************************************************************************************ // - // Helper method that generates an XML string. + // Loads XML from a file. If the file is not found, load XML from a string. // //************************************************************************************ + public void SaveXML(XmlDocument doc) + { + doc.Save(Constants.booksFileName); + } + #endregion + + #region Validate XML against a Schema + + // + //************************************************************************************ + // + // Helper method that generates an XML string. + // + //************************************************************************************ private string generateXMLString() { string xml = " \n" + @@ -68,22 +82,7 @@ private string generateXMLString() ""; return xml; } - - //************************************************************************************ - // - // Loads XML from a file. If the file is not found, load XML from a string. - // - //************************************************************************************ - public void SaveXML(XmlDocument doc) - { - doc.Save(Constants.booksFileName); - } - #endregion - - #region Validate XML against a Schema - - // - + //************************************************************************************ // // Associate the schema with XML. Then, load the XML and validate it against