Added missing members to XmlParserContext and started using it from XmlTextReader.
[mono.git] / mcs / class / System.XML / System.Xml / XmlDocument.cs
index b674a6e5bad19e6144147481dfaa40d7f627cad5..6ebd3d6544833e43a184d1123c88179142d9ede8 100644 (file)
@@ -16,12 +16,15 @@ namespace System.Xml
 
        public class XmlDocument : XmlNode
        {
+               #region Fields
+
+               private XmlLinkedNode lastLinkedChild;
+
+               #endregion
+
                #region Constructors
 
-               public XmlDocument () : base (null)
-               {
-                       FOwnerDocument = this;
-               }
+               public XmlDocument () : base (null) { }
 
                [MonoTODO]
                protected internal XmlDocument (XmlImplementation imp) : base (null)
@@ -57,9 +60,7 @@ namespace System.Xml
 
                [MonoTODO]
                public override string BaseURI {
-                       get {
-                               throw new NotImplementedException();
-                       }
+                       get { throw new NotImplementedException(); }
                }
 
                public XmlElement DocumentElement {
@@ -78,82 +79,64 @@ namespace System.Xml
 
                [MonoTODO]
                public virtual XmlDocumentType DocumentType {
-                       get {
-                               throw new NotImplementedException();
-                       }
+                       get { throw new NotImplementedException(); }
                }
 
                [MonoTODO]
                public XmlImplementation Implementation {
-                       get {
-                               throw new NotImplementedException();
-                       }
+                       get { throw new NotImplementedException(); }
                }
 
                [MonoTODO]
                public override string InnerXml {
-                       get {
-                               throw new NotImplementedException();
-                       }
-
-                       set {
-                               throw new NotImplementedException();
-                       }
+                       get { throw new NotImplementedException(); }
+                       set { throw new NotImplementedException(); }
                }
 
                public override bool IsReadOnly {
-                       get { 
-                               return false; 
-                       }
+                       get { return false; }
                }
 
-               public override string LocalName {
-                       get 
-                               return "#document"; 
+               internal override XmlLinkedNode LastLinkedChild {
+                       get     {
+                               return lastLinkedChild;
                        }
+
+                       set {
+                               lastLinkedChild = value;
+                       }
+               }
+               
+               public override string LocalName {
+                       get { return "#document"; }
                }
 
                public override string Name {
-                       get { 
-                               return "#document"; 
-                       }
+                       get { return "#document"; }
                }
 
                [MonoTODO]
                public XmlNameTable NameTable {
-                       get {
-                               throw new NotImplementedException();
-                       }
+                       get { throw new NotImplementedException(); }
                }
 
                public override XmlNodeType NodeType {
-                       get { 
-                               return XmlNodeType.Document; 
-                       }
+                       get { return XmlNodeType.Document; }
                }
 
                public override XmlDocument OwnerDocument {
-                       get { 
-                               return null; 
-                       }
+                       get { return null; }
                }
 
                [MonoTODO]
                public bool PreserveWhitespace {
-                       get {
-                               throw new NotImplementedException();
-                       }
-
-                       set {
-                               throw new NotImplementedException();
-                       }
+                       get { throw new NotImplementedException(); }
+                       set { throw new NotImplementedException(); }
                }
 
                [MonoTODO]
                public XmlResolver XmlResolver {
-                       set {
-                               throw new NotImplementedException();
-                       }
+                       set { throw new NotImplementedException(); }
                }
 
                #endregion
@@ -194,7 +177,6 @@ namespace System.Xml
                        return CreateAttribute (prefix, localName, String.Empty);
                }
 
-               [MonoTODO]
                public virtual XmlAttribute CreateAttribute (string prefix, string localName, string namespaceURI)
                {
                        return new XmlAttribute (prefix, localName, namespaceURI, this);