2002-03-12 Duncan Mak <duncan@ximian.com>
[mono.git] / mcs / class / System.XML / System.Xml / XmlWriter.cs
1 // -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-\r
2 //\r
3 // System.Xml.XmlWriter\r
4 //\r
5 // Author:\r
6 //   Daniel Weber (daniel-weber@austin.rr.com)\r
7 //\r
8 // (C) 2001 Daniel Weber\r
9 \r
10 using System;\r
11 \r
12 namespace System.Xml\r
13 {\r
14         /// <summary>\r
15         /// Abstract class XmlWriter\r
16         /// </summary>\r
17         public abstract class XmlWriter\r
18         {\r
19                 // Private data members\r
20                 //===========================================================================\r
21 \r
22                 // public properties\r
23                 //===========================================================================\r
24                 /// <summary>\r
25                 /// Get the state of the writer.\r
26                 /// </summary>\r
27                 public abstract WriteState WriteState {get;}\r
28 \r
29                 /// <summary>\r
30                 /// Get the current xml:lang scope, or null if not defined.\r
31                 /// </summary>\r
32                 public abstract string XmlLang {get;}\r
33 \r
34                 /// <summary>\r
35                 /// get an XmlSpace representing the current xml:space scope\r
36                 /// </summary>\r
37                 public abstract XmlSpace XmlSpace {get;}\r
38 \r
39                 // Public Methods\r
40                 //===========================================================================\r
41                 /// <summary>\r
42                 /// When overriden, closes this stream and the underlying stream.\r
43                 /// </summary>\r
44                 /// <exception cref="InvalidOperationException">A call is made to write more output when the stream is closed.</exception>\r
45                 public abstract void Close();\r
46 \r
47                 /// <summary>\r
48                 /// Flushes whatever is in the buffer to the underlying streams, and flushes any underlying streams.\r
49                 /// </summary>\r
50                 public abstract void Flush();\r
51 \r
52                 /// <summary>\r
53                 /// Returns closest prefix in current namespace, or null if none found.\r
54                 /// </summary>\r
55                 /// <param name="ns">namespace URI to find a prefix for.</param>\r
56                 /// <exception cref="ArgumentException">ns is null, or string.Empty</exception>\r
57                 /// <returns></returns>\r
58                 public abstract string LookupPrefix(string ns);\r
59 \r
60                 /// <summary>\r
61                 /// Write out all the attributes found at the current position in the XmlReader\r
62                 /// </summary>\r
63                 /// <param name="reader">XmlReader to read from</param>\r
64                 /// <param name="defattr">true to copy default attributes</param>\r
65                 /// <exception cref="ArgumentException">Reader is a null reference</exception>\r
66                 public virtual void WriteAttributes(\r
67                         XmlReader reader,\r
68                         bool defattr\r
69                         )\r
70                 {\r
71                         //TODO - implement XmlWriter.WriteAttributes(XmlReader, bool)\r
72                         throw new NotImplementedException();\r
73                 }\r
74 \r
75 \r
76         }\r
77 }\r