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:
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2002-09-19 11:55:56 +0400
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2002-09-19 11:55:56 +0400
commit7b527404ddf404ba347475624755a605375c1e47 (patch)
treeb7760c43c0f18a2cd53a43cac0ca7047b2b58b60 /mcs/class/System.XML/System.Xml
parentf9fcc1d75e5141dab7b2e21439d6992fe0487398 (diff)
2002-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* XmlTextReader.cs: fixed #30239. * XmlTextWriter.cs: fixed #30240. svn path=/trunk/mcs/; revision=7612
Diffstat (limited to 'mcs/class/System.XML/System.Xml')
-rw-r--r--mcs/class/System.XML/System.Xml/ChangeLog2
-rw-r--r--mcs/class/System.XML/System.Xml/XmlTextReader.cs6
-rw-r--r--mcs/class/System.XML/System.Xml/XmlTextWriter.cs17
3 files changed, 18 insertions, 7 deletions
diff --git a/mcs/class/System.XML/System.Xml/ChangeLog b/mcs/class/System.XML/System.Xml/ChangeLog
index e95ae501341..952c0ff1899 100644
--- a/mcs/class/System.XML/System.Xml/ChangeLog
+++ b/mcs/class/System.XML/System.Xml/ChangeLog
@@ -1,6 +1,8 @@
2002-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* XmlConvert.cs: finished implementation.
+ * XmlTextReader.cs: fixed #30239.
+ * XmlTextWriter.cs: fixed #30240.
2002-09-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
diff --git a/mcs/class/System.XML/System.Xml/XmlTextReader.cs b/mcs/class/System.XML/System.Xml/XmlTextReader.cs
index 85a8922ba85..02f2d3cf1b3 100644
--- a/mcs/class/System.XML/System.Xml/XmlTextReader.cs
+++ b/mcs/class/System.XML/System.Xml/XmlTextReader.cs
@@ -313,13 +313,9 @@ namespace System.Xml
readState = ReadState.Closed;
}
- [MonoTODO]
public override string GetAttribute (int i)
{
- if (i > attributes.Count)
- throw new ArgumentOutOfRangeException ("i is smaller than AttributeCount");
- else
- throw new NotImplementedException ();
+ return orderedAttributes [i] as string;
}
public override string GetAttribute (string name)
diff --git a/mcs/class/System.XML/System.Xml/XmlTextWriter.cs b/mcs/class/System.XML/System.Xml/XmlTextWriter.cs
index 7fae984c3d1..179f1511f18 100644
--- a/mcs/class/System.XML/System.Xml/XmlTextWriter.cs
+++ b/mcs/class/System.XML/System.Xml/XmlTextWriter.cs
@@ -297,10 +297,23 @@ namespace System.Xml
w.Write ("<!--{0}-->", text);
}
- [MonoTODO]
public override void WriteDocType (string name, string pubid, string sysid, string subset)
{
- throw new NotImplementedException ();
+ if (name == null || name.Trim ().Length == 0)
+ throw new ArgumentException ("Invalid DOCTYPE name", "name");
+
+ w.Write ("<!DOCTYPE ");
+ w.Write (name);
+ if (pubid != null) {
+ w.Write (String.Format (" PUBLIC {0}{1}{0} {0}{2}{0}", quoteChar, pubid, sysid));
+ } else if (sysid != null) {
+ w.Write (String.Format (" SYSTEM {0}{1}{0}", quoteChar, sysid));
+ }
+
+ if (subset != null)
+ w.Write ("[" + subset + "]");
+
+ w.Write('>');
}
public override void WriteEndAttribute ()