2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[mono.git] / mcs / class / System.Web / System.Web.UI.WebControls / XmlDataSourceView.cs
1 //
2 // System.Web.UI.WebControls.XmlDataSourceView
3 //
4 // Authors:
5 //      Ben Maurer (bmaurer@users.sourceforge.net)
6 //
7 // (C) 2003 Ben Maurer
8 //
9
10 #if NET_2_0
11 using System.Collections;
12 using System.Collections.Specialized;
13 using System.Text;
14 using System.Xml;
15
16 namespace System.Web.UI.WebControls {
17         public sealed class XmlDataSourceView : DataSourceView {
18                 public XmlDataSourceView (XmlDataSource owner, string name, XmlNodeList nodes)
19                 {
20                         // Why do they pass owner?
21                         this.name = name;
22                         this.nodes = new ArrayList (nodes.Count);
23                         
24                         foreach (XmlNode node in nodes) {
25                                 if (node.NodeType == XmlNodeType.Element)
26                                         this.nodes.Add (node);
27                         }
28                 }
29                 
30                 public override IEnumerable Select ()
31                 {
32                         return nodes;
33                 }
34                 
35                 public override string Name { 
36                         get { return name; }
37                 }
38                 
39                 string name;
40                 ArrayList nodes;
41         
42         }
43 }
44 #endif
45