Implementation and tests for XmlAttributeCollection.RemoveAll and XmlElement.RemoveAl...
[mono.git] / mcs / class / System.XML / System.Xml / XmlAttribute.cs
index 054eb655cbc54bfdcd1030a309c7c2cb8b6d07a8..70419b6c593c70b7864440412916865ba1eb7f26 100644 (file)
@@ -15,7 +15,6 @@ namespace System.Xml
        {
                #region Fields
 
-               private XmlElement ownerElement;
                private XmlLinkedNode lastChild;
                private string localName;
                private string namespaceURI;
@@ -41,10 +40,9 @@ namespace System.Xml
 
                #region Properties
 
-               [MonoTODO]
                public override string BaseURI {
                        get {
-                               throw new NotImplementedException ();
+                               return OwnerElement.BaseURI;
                        }
                }
 
@@ -59,10 +57,11 @@ namespace System.Xml
                        }
                }
 
-               [MonoTODO]
+               [MonoTODO ("Setter.")]
                public override string InnerXml {
                        get {
-                               throw new NotImplementedException ();
+                               // Not sure why this is an override.  Passing through for now.
+                               return base.InnerXml;
                        }
 
                        set {
@@ -102,7 +101,7 @@ namespace System.Xml
 
                public virtual XmlElement OwnerElement {
                        get {
-                               return ownerElement;
+                               return base.ParentNode as XmlElement;
                        }
                }
 
@@ -113,7 +112,15 @@ namespace System.Xml
                        }
                }
 
+               [MonoTODO]
+               // We gotta do more in the set block here
+               // We need to do the proper tests and throw
+               // the correct Exceptions
                public override string Prefix {
+                       set {
+                               prefix = value;
+                       }
+                       
                        get {
                                return prefix;
                        }
@@ -161,21 +168,14 @@ namespace System.Xml
                        return node;
                }
 
-               internal void SetOwnerElement (XmlElement ownerElement)
-               {
-                       this.ownerElement = ownerElement;
-               }
-
-               [MonoTODO]
                public override void WriteContentTo (XmlWriter w)
                {
-                       throw new NotImplementedException ();
+                       w.WriteString (Value);
                }
 
-               [MonoTODO]
                public override void WriteTo (XmlWriter w)
                {
-                       throw new NotImplementedException ();
+                       w.WriteAttributeString (prefix, localName, namespaceURI, Value);
                }
 
                #endregion