Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Diamond <injektilo@mono-cvs.ximian.com>2002-03-03 03:35:09 +0300
committerJason Diamond <injektilo@mono-cvs.ximian.com>2002-03-03 03:35:09 +0300
commitb85325090c44995ea0a8155ef09aef8caac8520d (patch)
treebaa34e0b566cfec08e57ac7187aa9b80d3ddbd2d /mcs/class/System.XML/System.Xml/XmlCharacterData.cs
parent7745d16d5de75920c99a65efa744d6f8138217ae (diff)
Got attributes and text nodes working while loading a document.
svn path=/trunk/mcs/; revision=2848
Diffstat (limited to 'mcs/class/System.XML/System.Xml/XmlCharacterData.cs')
-rw-r--r--mcs/class/System.XML/System.Xml/XmlCharacterData.cs256
1 files changed, 102 insertions, 154 deletions
diff --git a/mcs/class/System.XML/System.Xml/XmlCharacterData.cs b/mcs/class/System.XML/System.Xml/XmlCharacterData.cs
index 41ba1de77c7..0d5cb2c4d52 100644
--- a/mcs/class/System.XML/System.Xml/XmlCharacterData.cs
+++ b/mcs/class/System.XML/System.Xml/XmlCharacterData.cs
@@ -1,154 +1,102 @@
-// System.Xml.XmlCharacterData.cs
-//
-// Author: Daniel Weber (daniel-weber@austin.rr.com)
-//
-// Implementation of abstract Xml.XmlCharacterData class
-//
-// Provides text manipulation methods used by derived classes
-// abstract class
-
-using System;
-
-namespace System.Xml
-{
- /// <summary>
- /// Abstratc class to provide text manipulation methods for derived classes
- /// </summary>
- public abstract class XmlCharacterData : XmlLinkedNode
- {
- // ============ Public Properties =====================================
- //=====================================================================
- /// <summary>
- /// Contains the nodes data
- /// </summary>
- public virtual string Data
- {
- get
- {
- // TODO - implement Data {get;}
- throw new NotImplementedException();
- }
-
- set
- {
- // TODO - implement Data {set;}
- throw new NotImplementedException();
- }
- }
-
- /// <summary>
- /// Get/Set the nodes value
- /// </summary>
- public override string Value
- {
- get
- {
- // TODO - implement Value {get;}
- throw new NotImplementedException();
- }
-
- set
- {
- // TODO - implement Value {set;}
- throw new NotImplementedException();
- }
- }
-
- public override string InnerText
- {
- get
- {
- // TODO - implement InnerText {get;}
- throw new NotImplementedException();
- }
-
- set
- {
- // TODO - implement InnerText {set;}
- throw new NotImplementedException();
- }
- }
-
- /// <summary>
- /// Returns the length of data, in characters
- /// </summary>
- public virtual int Length
- {
- get
- {
- // TODO - implement Length {get;}
- throw new NotImplementedException();
- }
- }
-
- // ============ Public Methods =======================================
- //=====================================================================
- /// <summary>
- /// Appends string strData to the end of data
- /// </summary>
- /// <param name="strData"></param>
- public virtual void AppendData(string strData)
- {
- // TODO - implement AppendData(strData)
- throw new NotImplementedException();
- }
-
- /// <summary>
- /// Remove a range of characters from the node
- /// </summary>
- /// <param name="offset">offset, in characters, to start delete</param>
- /// <param name="count">Number of characters to delete</param>
- public virtual void DeleteData(int offset, int count)
- {
- // TODO - implement DeleteData(offset, count)
- throw new NotImplementedException();
- }
-
- /// <summary>
- /// Replaces the number of characters, starting at offset, with the passed string
- /// </summary>
- /// <param name="offset">Offset (in characters) to start replacement</param>
- /// <param name="count">Number of characters to replace</param>
- /// <param name="strData">Replacement string</param>
- public virtual void ReplaceData(int offset, int count, string strData)
- {
- // TODO - implement ReplaceData(offset, count, strData)
- throw new NotImplementedException();
- }
-
- /// <summary>
- /// Retrieves a substring of the specified range
- /// </summary>
- /// <param name="offset">Character offset to begin string</param>
- /// <param name="count">Number of characters to return</param>
- /// <returns></returns>
- public virtual string Substring(int offset, int count)
- {
- // TODO - implement Substring(offset, count)
- throw new NotImplementedException();
- }
-
- // ============ Protected Methods ====================================
- //=====================================================================
- /// <summary>
- /// Listed in beta 2, but no description
- /// [to be supplied]
- /// </summary>
- /// <param name="node"></param>
- /// <param name="xnt"></param>
- /// <returns></returns>
- protected internal bool DecideXPNodeTypeForWhitespace(
- XmlNode node,
- ref XPathNodeType xnt
- )
- {
- // TODO
- throw new NotImplementedException();
- }
-
- // Constructors
- internal XmlCharacterData ( XmlDocument aOwnerDoc) : base(aOwnerDoc)
- {
- }
- }
-} \ No newline at end of file
+//
+// System.Xml.XmlText
+//
+// Author:
+// Jason Diamond <jason@injektilo.org>
+//
+// (C) 2002 Jason Diamond http://injektilo.org/
+//
+
+using System;
+
+namespace System.Xml
+{
+ public abstract class XmlCharacterData : XmlLinkedNode
+ {
+ private string data;
+
+ #region Constructor
+
+ protected internal XmlCharacterData (string data, XmlDocument doc) : base (doc)
+ {
+ this.data = data;
+ }
+
+ #endregion
+
+ #region Properties
+
+ public virtual string Data {
+ get {
+ return data;
+ }
+
+ set {
+ data = value;
+ }
+ }
+
+ [MonoTODO]
+ public override string InnerText {
+ get {
+ throw new NotImplementedException ();
+ }
+
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int Length {
+ get {
+ return data != null ? data.Length : 0;
+ }
+ }
+
+ public override string Value {
+ get {
+ return data;
+ }
+
+ set {
+ data = value;
+ }
+ }
+
+ #endregion
+
+ #region Methods
+
+ [MonoTODO]
+ public virtual void AppendData (string strData)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public virtual void DeleteData (int offset, int count)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public virtual void InsertData (int offset, string strData)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public virtual void ReplaceData (int offset, int count, string strData)
+ {
+ throw new NotImplementedException();
+ }
+
+ [MonoTODO]
+ public virtual string Substring(int offset, int count)
+ {
+ throw new NotImplementedException();
+ }
+
+ #endregion
+ }
+}