XPathDocument2.cs 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. //
  2. // XPathDocument2.cs
  3. //
  4. // Author:
  5. // Atsushi Enomoto <[email protected]>
  6. //
  7. // (C)2003 Atsushi Enomoto
  8. //
  9. #if NET_1_2
  10. using System;
  11. using System.Collections;
  12. using System.IO;
  13. using System.Xml.Schema;
  14. namespace System.Xml
  15. {
  16. public class XPathDocument2
  17. {
  18. // XPathDocumentTree tree;
  19. bool acceptChangesOnLoad;
  20. XmlNameTable nameTable;
  21. bool createDefaultDocument;
  22. public XPathDocument2 () : this (null, false) {}
  23. public XPathDocument2 (XmlNameTable nameTable) : this (nameTable, false) {}
  24. public XPathDocument2 (bool createDefaultDocument) : this (null, createDefaultDocument) {}
  25. // TODO
  26. public XPathDocument2 (XmlNameTable nameTable, bool createDefaultDocument)
  27. {
  28. this.nameTable = nameTable;
  29. this.createDefaultDocument = createDefaultDocument;
  30. }
  31. // internal XPathDocumentTree Tree {
  32. // get { return tree; }
  33. // }
  34. internal void DeleteNode (XPathNavigator2 nav)
  35. {
  36. throw new NotImplementedException ();
  37. }
  38. public event XPathDocument2ChangedEventHandler ChangeRejected;
  39. public event XPathDocument2ChangedEventHandler ItemChanged;
  40. public event XPathDocument2ChangedEventHandler ItemChanging;
  41. public event XPathDocument2ChangedEventHandler ItemInserted;
  42. public event XPathDocument2ChangedEventHandler ItemInserting;
  43. public event XPathDocument2ChangedEventHandler ItemRemoved;
  44. public event XPathDocument2ChangedEventHandler ItemRemoving;
  45. public event XPathDocument2ChangedEventHandler RejectingChange;
  46. public bool AcceptChangesOnLoad {
  47. get { return acceptChangesOnLoad; }
  48. set { acceptChangesOnLoad = value; }
  49. }
  50. public bool DefaultRoot {
  51. get { throw new NotImplementedException (); }
  52. }
  53. public XmlNameTable NameTable {
  54. get { return nameTable; }
  55. }
  56. public void AcceptChanges ()
  57. {
  58. throw new NotImplementedException ();
  59. }
  60. public bool CheckValidity (XmlSchemaSet schemas, ValidationEventHandler validationEventHandler)
  61. {
  62. throw new NotImplementedException ();
  63. }
  64. public XPathChangeNavigator CreateXPathChangeNavigator ()
  65. {
  66. throw new NotImplementedException ();
  67. }
  68. public XPathEditor CreateXPathEditor ()
  69. {
  70. // return new XPathDocumentEditor (this);
  71. throw new NotImplementedException ();
  72. }
  73. public XPathNavigator2 CreateXPathNavigator2 ()
  74. {
  75. // return new XPathDocumentNavigator2 (this);
  76. throw new NotImplementedException ();
  77. }
  78. public bool HasChanges ()
  79. {
  80. throw new NotImplementedException ();
  81. }
  82. public bool HasChanges (XmlChangeFilters changeFilter)
  83. {
  84. throw new NotImplementedException ();
  85. }
  86. public bool IsDeletedFragment (XPathNavigator2 xmlNavigator, bool isPermanent)
  87. {
  88. throw new NotImplementedException ();
  89. }
  90. public bool IsDeletedFragment (XPathNavigator2 xmlNavigator)
  91. {
  92. throw new NotImplementedException ();
  93. }
  94. public void Load (string url)
  95. {
  96. XmlTextReader xtr = new XmlTextReader (url);
  97. Load (xtr);
  98. xtr.Close ();
  99. }
  100. public void Load (TextReader reader)
  101. {
  102. XmlTextReader xtr = new XmlTextReader (reader);
  103. Load (xtr);
  104. }
  105. public void Load (Stream stream)
  106. {
  107. XmlTextReader xtr = new XmlTextReader (stream);
  108. Load (xtr);
  109. }
  110. public void LoadXml (string xml)
  111. {
  112. XmlTextReader xtr = new XmlTextReader (xml, XmlNodeType.Document, null);
  113. Load (xtr);
  114. xtr.Close ();
  115. }
  116. public void Load (XmlReader xmlReader)
  117. {
  118. // tree = new XPathDocumentTree (xmlReader);
  119. if (acceptChangesOnLoad)
  120. AcceptChanges ();
  121. }
  122. public void RejectChanges ()
  123. {
  124. throw new NotImplementedException ();
  125. }
  126. public void Validate (XmlSchemaSet schemas, ValidationEventHandler validationEventHandler)
  127. {
  128. throw new NotImplementedException ();
  129. }
  130. }
  131. public class XPathDocument2ChangedEventArgs : EventArgs
  132. {
  133. XPathDocument2ChangedEventAction action;
  134. internal XPathDocument2ChangedEventArgs (XPathDocument2ChangedEventAction action, XPathNavigator2 nav)
  135. {
  136. this.action = action;
  137. throw new NotImplementedException ();
  138. }
  139. public XPathDocument2ChangedEventAction Action {
  140. get { return action; }
  141. }
  142. public XPathNavigator2 Item {
  143. get { throw new NotImplementedException (); }
  144. }
  145. public XPathNavigator2 NewParent {
  146. get { throw new NotImplementedException (); }
  147. }
  148. public XPathNavigator2 NewPreviousItem {
  149. get { throw new NotImplementedException (); }
  150. }
  151. public string NewValue {
  152. get { throw new NotImplementedException (); }
  153. }
  154. public XPathNavigator2 OldParent {
  155. get { throw new NotImplementedException (); }
  156. }
  157. public XPathNavigator2 OldPreviousItem {
  158. get { throw new NotImplementedException (); }
  159. }
  160. public string OldValue {
  161. get { throw new NotImplementedException (); }
  162. }
  163. }
  164. }
  165. #endif