You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Removed poor coding style in schema validation (#8155)
* Removed poor coding style in schema validation
getSchema/LoadDocumentWithSchemaValidation
* Returned null on error (versus throwing an exception) -- now just falls back on exceptions
* Used a catch in the success path -- removed try/catch
* Removed .NET 1.0 code (below UTF8.GetBytes/MemoryStream) and implemented using simpler, .NET 1.1 StringReader
byte[] byteArray = Encoding.UTF8.GetBytes(xml);
MemoryStream stream = new MemoryStream(byteArray);
* Added error handling for FileNotFoundException
@MSDN-WhiteKnight and I agreed on a cleaner example than the original that included a check for FileNotFoundException in the get schema and get xml code.
* Update snippets/csharp/System.Xml/XmlDocument/Overview/xmlhelpermethods.cs
Co-authored-by: MSDN.WhiteKnight <[email protected]>
* Update snippets/csharp/System.Xml/XmlDocument/Overview/xmlhelpermethods.cs
Co-authored-by: MSDN.WhiteKnight <[email protected]>
* Update snippets/csharp/System.Xml/XmlDocument/Overview/xmlhelpermethods.cs
Co-authored-by: MSDN.WhiteKnight <[email protected]>
Co-authored-by: MSDN.WhiteKnight <[email protected]>
0 commit comments