The Labs \ Source Viewer \ SSCLI \ System.Xml \ ValidationType

  1. //------------------------------------------------------------------------------
  2. // <copyright file="ValidationType.cs" company="Microsoft">
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. // </copyright>
  14. //------------------------------------------------------------------------------
  15. namespace System.Xml
  16. {
  17.     // Specifies the type of validation to perform in XmlValidatingReader or in XmlReaderSettings.
  18.     public enum ValidationType
  19.     {
  20.         // No validation will be performed.
  21.         None,
  22.        
  23.         // In XmlValidatingReader ValidationType.Auto does the following:
  24.         // 1) If there is no DTD or schema, it will parse the XML without validation.
  25.         // 2) If there is a DTD defined in a <!DOCTYPE ...> declaration, it will load the DTD and
  26.         // process the DTD declarations such that default attributes and general entities will
  27.         // be made available. General entities are only loaded and parsed if they are used (expanded).
  28.         // 3) If there is no <!DOCTYPE ...> declaration but there is an XSD "schemaLocation" attribute,
  29.         // it will load and process those XSD schemas and it will return any default attributes defined in those schemas.
  30.         // 4) If there is no <!DOCTYPE ...&> declaration and no XSD "schemaLocation" attribute but there are some namespaces
  31.         // using the MSXML "x-schema:" URN prefix, it will load and process those schemas and it will return any default
  32.         // attributes defined in those schemas.
  33.         [Obsolete("Validation type should be specified as DTD or Schema.")]
  34.         Auto,
  35.        
  36.         // Validate according to DTD.
  37.         DTD,
  38.        
  39.         // Validate according to XDR.
  40.         [Obsolete("XDR Validation through XmlValidatingReader is obsoleted")]
  41.         XDR,
  42.        
  43.         // Validate according to W3C XSD schemas, including inline schemas. An error is returned if both XDR and XSD schemas
  44.         // are referenced from the same document.
  45.         Schema
  46.     }
  47. }

Developer Fusion