XmlProcessingInstruction.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. //
  2. // System.Xml.XmlProcessingInstruction
  3. //
  4. // Author:
  5. // Kral Ferch <[email protected]>
  6. //
  7. // (C) 2002 Kral Ferch
  8. //
  9. using System;
  10. namespace System.Xml
  11. {
  12. public class XmlProcessingInstruction : XmlLinkedNode
  13. {
  14. string target;
  15. string data;
  16. #region Constructors
  17. protected internal XmlProcessingInstruction(string target, string data, XmlDocument doc) : base(doc)
  18. {
  19. this.target = target;
  20. this.data = data;
  21. }
  22. #endregion
  23. #region Properties
  24. public string Data
  25. {
  26. get {
  27. return data;
  28. }
  29. set {
  30. data = value;
  31. }
  32. }
  33. public override string LocalName
  34. {
  35. get {
  36. return target;
  37. }
  38. }
  39. public override string Name
  40. {
  41. get {
  42. return target;
  43. }
  44. }
  45. public override XmlNodeType NodeType
  46. {
  47. get {
  48. return XmlNodeType.ProcessingInstruction;
  49. }
  50. }
  51. public string Target
  52. {
  53. get {
  54. return target;
  55. }
  56. }
  57. public override string Value
  58. {
  59. get {
  60. return data;
  61. }
  62. }
  63. #endregion
  64. #region Methods
  65. public override XmlNode CloneNode(bool deep)
  66. {
  67. return new XmlProcessingInstruction(target, data, OwnerDocument);
  68. }
  69. [MonoTODO]
  70. public override void WriteContentTo(XmlWriter w)
  71. {
  72. throw new NotImplementedException ();
  73. }
  74. [MonoTODO]
  75. public override void WriteTo(XmlWriter w)
  76. {
  77. throw new NotImplementedException ();
  78. }
  79. #endregion
  80. }
  81. }