Exemple #1
0
		internal virtual Rhino.Xmlimpl.XmlNode[] GetMatchingChildren(Rhino.Xmlimpl.XmlNode.Filter filter)
		{
			List<Rhino.Xmlimpl.XmlNode> rv = new List<Rhino.Xmlimpl.XmlNode>();
			XmlNodeList nodes = this.dom.ChildNodes;
			for (int i = 0; i < nodes.Count; i++)
			{
				System.Xml.XmlNode node = nodes.Item(i);
				if (filter.Accept(node))
				{
					rv.Add(CreateImpl(node));
				}
			}
			return Sharpen.Collections.ToArray(rv, new Rhino.Xmlimpl.XmlNode[rv.Count]);
		}
Exemple #2
0
		internal virtual void AddMatchingChildren(XMLList result, Rhino.Xmlimpl.XmlNode.Filter filter)
		{
			System.Xml.XmlNode node = this.dom;
			XmlNodeList children = node.ChildNodes;
			for (int i = 0; i < children.Count; i++)
			{
				System.Xml.XmlNode childnode = children.Item(i);
				Rhino.Xmlimpl.XmlNode child = Rhino.Xmlimpl.XmlNode.CreateImpl(childnode);
				if (filter.Accept(childnode))
				{
					result.AddToList(child);
				}
			}
		}