X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem.XML%2FSystem.Xml%2FXmlText.cs;h=00b0c32d514a827f5da20b99b1c23675a9f179c4;hb=2a6da5d6f1e6d02f0e3595b3a02af6cacea2772c;hp=9f10e49e18685b052201d157ddd1e94f6f9b594f;hpb=1afc7ead96da35318aaf5165829ed6a61e9671d8;p=mono.git diff --git a/mcs/class/System.XML/System.Xml/XmlText.cs b/mcs/class/System.XML/System.Xml/XmlText.cs index 9f10e49e186..00b0c32d514 100644 --- a/mcs/class/System.XML/System.Xml/XmlText.cs +++ b/mcs/class/System.XML/System.Xml/XmlText.cs @@ -8,6 +8,7 @@ // using System; +using System.Xml.XPath; namespace System.Xml { @@ -36,6 +37,12 @@ namespace System.Xml get { return XmlNodeType.Text; } } + internal override XPathNodeType XPathNodeType { + get { + return XPathNodeType.Text; + } + } + public override string Value { get { return Data; } set { Data = value; } @@ -45,28 +52,30 @@ namespace System.Xml #region Methods - [MonoTODO] public override XmlNode CloneNode (bool deep) { - throw new NotImplementedException (); + XmlText newText = OwnerDocument.CreateTextNode(Data); + if(deep) + { + foreach(XmlNode child in ChildNodes) + newText.AppendChild(child.CloneNode(deep)); + } + return newText; } - [MonoTODO] public virtual XmlText SplitText (int offset) { - throw new NotImplementedException (); + XmlText next = OwnerDocument.CreateTextNode(this.Data.Substring(offset)); + DeleteData(offset, Data.Length - offset); + this.ParentNode.InsertAfter(next, this); + return next; } - [MonoTODO] - public override void WriteContentTo (XmlWriter w) - { - throw new NotImplementedException (); - } + public override void WriteContentTo (XmlWriter w) {} - [MonoTODO] public override void WriteTo (XmlWriter w) { - throw new NotImplementedException (); + w.WriteString (Data); } #endregion