XmlImplementation.cs 877 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // System.Xml.XmlImplementation.cs
  3. //
  4. // Author: Duncan Mak ([email protected])
  5. //
  6. // (C) Ximian, Inc.
  7. //
  8. namespace System.Xml
  9. {
  10. public class XmlImplementation
  11. {
  12. #region Constructor
  13. public XmlImplementation ()
  14. : base ()
  15. {
  16. // The following keys are default of MS .NET Framework
  17. NameTable nt = new NameTable();
  18. internalNameTable = nt;
  19. }
  20. #endregion
  21. #region Public Methods
  22. public virtual XmlDocument CreateDocument ()
  23. {
  24. return new XmlDocument (this);
  25. }
  26. public bool HasFeature (string strFeature, string strVersion)
  27. {
  28. if ((strFeature == "XML") || (strFeature == "xml") // not case-sensitive
  29. && (strVersion == "1.0") || (strVersion == "2.0"))
  30. return true;
  31. else
  32. return false;
  33. }
  34. #endregion
  35. #region Internals
  36. internal XmlNameTable internalNameTable;
  37. #endregion
  38. }
  39. }