blob: 68cf8dc53504a4ab4e2b4396ac1fb3312a0ebdc1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
//
// System.Web.UI.WebControls.XmlHierarchicalEnumerable
//
// Authors:
// Ben Maurer (bmaurer@users.sourceforge.net)
//
// (C) 2003 Ben Maurer
//
#if NET_2_0
using System.Collections;
using System.Collections.Specialized;
using System.Text;
using System.Xml;
namespace System.Web.UI.WebControls {
public class XmlHierarchicalEnumerable : IHierarchicalEnumerable {
internal XmlHierarchicalEnumerable (XmlNodeList nodeList)
{
this.nodeList = nodeList;
}
IEnumerator IEnumerable.GetEnumerator ()
{
ArrayList ret = new ArrayList (nodeList.Count);
foreach (XmlNode node in nodeList) {
if (node.NodeType == XmlNodeType.Element)
ret.Add (new XmlHierarchyData (node));
}
return ret.GetEnumerator ();
}
IHierarchyData IHierarchicalEnumerable.GetHierarchyData (object enumeratedItem)
{
return (IHierarchyData) enumeratedItem;
}
XmlNodeList nodeList;
}
}
#endif
|