XmlImplementation.cs 865 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //
  2. // System.Xml.XmlImplementation.cs
  3. //
  4. // Author: Duncan Mak ([email protected])
  5. //
  6. // (C) Ximian, Inc.
  7. //
  8. using System.Globalization;
  9. namespace System.Xml
  10. {
  11. public class XmlImplementation
  12. {
  13. #region Constructor
  14. public XmlImplementation ()
  15. {
  16. InternalNameTable = new NameTable ();
  17. }
  18. #endregion
  19. #region Public Methods
  20. public virtual XmlDocument CreateDocument ()
  21. {
  22. return new XmlDocument (this);
  23. }
  24. public bool HasFeature (string strFeature, string strVersion)
  25. {
  26. if (String.Compare (strFeature, "xml", true, CultureInfo.InvariantCulture) == 0) { // not case-sensitive
  27. switch (strVersion) {
  28. case "1.0":
  29. case "2.0":
  30. case null:
  31. return true;
  32. }
  33. }
  34. return false;
  35. }
  36. #endregion
  37. #region Internals
  38. internal XmlNameTable InternalNameTable;
  39. #endregion
  40. }
  41. }