当前位置: 首页>>代码示例>>C#>>正文


C# XmlNodeList.GetEnumerator方法代码示例

本文整理汇总了C#中System.Xml.XmlNodeList.GetEnumerator方法的典型用法代码示例。如果您正苦于以下问题:C# XmlNodeList.GetEnumerator方法的具体用法?C# XmlNodeList.GetEnumerator怎么用?C# XmlNodeList.GetEnumerator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Xml.XmlNodeList的用法示例。


在下文中一共展示了XmlNodeList.GetEnumerator方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CustomProperty

 public CustomProperty(object pSelectObject, XmlNodeList pObjectPropertys)
 {
     this.m_CurrentSelectObject = pSelectObject;
     IEnumerator tmpIe = pObjectPropertys.GetEnumerator();
     while (tmpIe.MoveNext())
     {
         this.AddAttribsList(tmpIe, pSelectObject);
     }
 }
开发者ID:xiaoyj,项目名称:Space,代码行数:9,代码来源:CustomProperty.cs

示例2: AppendChildNodePairs

        private string AppendChildNodePairs(XmlNodeList nodes)
        {
            StringBuilder	sbPairs		= new StringBuilder("");
            IEnumerator		IEnumChild	= nodes.GetEnumerator();
            while (IEnumChild.MoveNext())
            {
                XmlNode nodeChild = (XmlNode)IEnumChild.Current;
                string	strKey	= nodeChild.Name;
                string	strVal	= nodeChild.InnerText.Trim();

                sbPairs.Append(strKey + " = " + strVal + strPairDelimiter);
            }

            return sbPairs.ToString();
        }
开发者ID:natemow,项目名称:samples,代码行数:15,代码来源:frmParser.cs

示例3: ElementArrayFromNodeList

 /// <summary>
 /// Builds an array of XmlElements from an XmlNodeList
 /// </summary>
 /// <param name="list">an XmlNodeList</param>
 /// <param name="filter">If true, returns only the elements with an "enabled" property set to "True" or "Yes"</param>
 /// <returns>the array of elements</returns>
 /// <remarks>
 /// If there are no elements in the list or that are enabled, an empty array will be returned
 /// </remarks>
 public static XmlElement[] ElementArrayFromNodeList( XmlNodeList list,
                                                       bool filter )
 {
     ArrayList v = new ArrayList();
     IEnumerator enumerator;
     if ( filter ) {
         enumerator = new FilteredElementList( list ).GetEnumerator();
     }
     else {
         enumerator = list.GetEnumerator();
     }
     while ( enumerator.MoveNext() ) {
         v.Add( enumerator.Current );
     }
     return (XmlElement []) v.ToArray( typeof ( XmlElement ) );
 }
开发者ID:rafidzal,项目名称:OpenADK-csharp,代码行数:25,代码来源:XmlUtils.cs

示例4: GetGpsPoints

        private static IList<GpsTimePoint> GetGpsPoints(XmlNodeList nodes)
        {
            var retVal = new List<GpsTimePoint>();

            var e = nodes.GetEnumerator();
            while (e.MoveNext())
            {
                var utcTimepoint = ((XmlNode)e.Current).InnerText;

                if (!e.MoveNext()) break;

                var t = ((XmlNode)e.Current).InnerText.Split(new[] { ' ' });
                if (t.Length < 2) continue;

                retVal.Add(new GpsTimePoint(t[0], t[1], t.ElementAtOrDefault(2), utcTimepoint));
            }

            return retVal;
        }
开发者ID:pacurrie,项目名称:KmlToGpxConverter,代码行数:19,代码来源:KmlReader.cs

示例5: AddAll

 public virtual bool AddAll(int index, XmlNodeList list)
 {
     bool result = false;
     if (list != null)
     {
         IEnumerator tempEnumerator = list.GetEnumerator();
         int tempIndex = index;
         while (tempEnumerator.MoveNext())
         {
             base.Insert(tempIndex++, tempEnumerator.Current);
             result = true;
         }
     }
     return result;
 }
开发者ID:spib,项目名称:nhcontrib,代码行数:15,代码来源:SupportClass.cs

示例6: ProcessChildren

		protected void ProcessChildren(XmlNodeList l)
		{
			IEnumerator enumChildren = l.GetEnumerator();

			while(enumChildren.MoveNext())
			{
				XmlNode c = (XmlNode) enumChildren.Current;
				switch(c.Name)
				{
					case DMethod.IAM:
						AddChild(new DMethod(c));
						break;
					case DParam.IAM:
                        DParam dparam = new DParam(c);
                        AddChild(dparam);
                        
                        // check if this is a default property
                        if (dparam.HasDefaultValue) 
                            m_defaultProp = new Property(Identifier, dparam.DefaultValue);
						break;
				}
			}
		}
开发者ID:jozilla,项目名称:Uiml.net,代码行数:23,代码来源:DProperty.cs

示例7: ProcessChildren

        protected void ProcessChildren(XmlNodeList l)
		{
			IEnumerator enumChildren = l.GetEnumerator();

			while(enumChildren.MoveNext())
			{
				XmlNode c = (XmlNode) enumChildren.Current;
				switch(c.Name)
				{
					case DMethod.IAM:
						AddChild(new DMethod(c));
						break;
					case DProperty.IAM:
						AddChild(new DProperty(c));
						break;
					case Event.IAM:
						AddChild(new Event(c));
						break;
						// TODO: implemenent listener
					case "listener": 
						break;
				}
			}
		}
开发者ID:jozilla,项目名称:Uiml.net,代码行数:24,代码来源:DClass.cs

示例8: AssertNodeListEqual

		void AssertNodeListEqual (XmlNodeList nl1, XmlNodeList nl2, string label)
		{
			Assert.AreEqual (nl1.Count, nl2.Count, label + ": node count");
			IEnumerator e1, e2;
			int i;
			for (i = 0, e1 = nl1.GetEnumerator (), e2 = nl2.GetEnumerator (); e1.MoveNext (); i++) {
				Assert.IsTrue (e2.MoveNext (), label + " : nl2.MoveNext");
				Assert.AreEqual (e1.Current, e2.Current, label + " : node at " + i);
			}
			Assert.IsFalse (e2.MoveNext (), label + " : nl2 has extras");
		}
开发者ID:Profit0004,项目名称:mono,代码行数:11,代码来源:XmlDsigXsltTransformTest.cs

示例9: ProcessChildren

		protected void ProcessChildren(XmlNodeList l)
		{
			IEnumerator enumChildren = l.GetEnumerator();

			while(enumChildren.MoveNext())
			{
				XmlNode c = (XmlNode) enumChildren.Current;
				switch(c.Name)
				{
					case DMethod.IAM:
						AddChild(new DMethod(c));
						break;					
				}
			}
		}
开发者ID:jozilla,项目名称:Uiml.net,代码行数:15,代码来源:DComponent.cs


注:本文中的System.Xml.XmlNodeList.GetEnumerator方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。