Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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

//<Snippet2>

//************************************************************************************
//
// Helper method that generates an XML string.
//
//************************************************************************************
private string generateXMLString()
{
string xml = "<?xml version=\"1.0\"?> \n" +
Expand All @@ -68,22 +82,7 @@ private string generateXMLString()
"</books>";
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

//<Snippet2>


//************************************************************************************
//
// Associate the schema with XML. Then, load the XML and validate it against
Expand Down