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


C# XPathNavigator.MoveToNextAttribute方法代码示例

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


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

示例1: ParameterNode

        public ParameterNode(XPathNavigator aNode)
        {

            valueNode = String.Empty;
            typeNode = String.Empty;
            ruleValueNode = String.Empty;
            name = String.Empty;

            if (aNode.MoveToFirstAttribute())
            {
                do
                {
                    string nodeName = aNode.Name;
                    switch (nodeName)
                    {
                        case PARAMETER_ATTRS.NAME:
                            name = aNode.Value;
                            break;
                        case PARAMETER_ATTRS.VALUE:
                            valueNode = aNode.Value;
                            break;
                        case PARAMETER_ATTRS.TYPE:
                            typeNode = aNode.Value;
                            break;
                        case PARAMETER_ATTRS.RULE_VALUE:
                            ruleValueNode = aNode.Value;
                            break;
                    }
                } while (aNode.MoveToNextAttribute());
                aNode.MoveToParent();
            }

        }
开发者ID:killbug2004,项目名称:WSProf,代码行数:33,代码来源:ParameterNode.cs

示例2: XmlNodeTaskItem

        /// <summary>
        /// Initializes a new instance of an XmlNodeTaskItem
        /// </summary>
        /// <param name="xpathNavigator">The selected XmlNode</param>
        /// <param name="reservedMetaDataPrefix">The prefix to attach to the reserved metadata properties.</param>
        public XmlNodeTaskItem(XPathNavigator xpathNavigator, string reservedMetaDataPrefix)
        {
            this.ReservedMetaDataPrefix = reservedMetaDataPrefix;

            switch (xpathNavigator.NodeType)
            {
                case XPathNodeType.Attribute:
                    itemSpec = xpathNavigator.Value;
                    break;
                default:
                    itemSpec = xpathNavigator.Name;
                    break;
            }
            metaData.Add(ReservedMetaDataPrefix + "value", xpathNavigator.Value);
            metaData.Add(ReservedMetaDataPrefix + "innerXml", xpathNavigator.InnerXml);
            metaData.Add(ReservedMetaDataPrefix + "outerXml", xpathNavigator.OuterXml);

            if (xpathNavigator.MoveToFirstAttribute())
            {
                do
                {
                    metaData.Add(xpathNavigator.Name, xpathNavigator.Value);
                } while (xpathNavigator.MoveToNextAttribute());
            }
        }
开发者ID:trippleflux,项目名称:jezatools,代码行数:30,代码来源:XmlNodeTaskItem.cs

示例3: ReadXml

        public void ReadXml(XPathNavigator node)
        {
            if (node.MoveToFirstAttribute()) {

            do {
               if (String.IsNullOrEmpty(node.NamespaceURI)) {

                  switch (node.LocalName) {
                     case "address":
                        this.Address = node.Value;
                        break;

                     case "display-name":
                        this.DisplayName = node.Value;
                        break;

                     default:
                        break;
                  }
               }

            } while (node.MoveToNextAttribute());

            node.MoveToParent();
             }
        }
开发者ID:skurdiukov,项目名称:myxsl,代码行数:26,代码来源:XPathMailAddress.cs

示例4: ControlloLingua

 public static bool ControlloLingua(XPathNavigator navigator)
 {
     bool risultato = true;
     navigator.MoveToNextAttribute();
     String hreflang = navigator.GetAttribute("hreflang", "");
     if (hreflang != navigator.XmlLang)
         risultato = false;
     return risultato;
 }
开发者ID:Esriitalia,项目名称:VerA,代码行数:9,代码来源:ControlliSemplici.cs

示例5: AppOpenXml

 public static bool AppOpenXml(XPathNavigator navigator)
 {
     bool risultato = true;
     navigator.MoveToNextAttribute();
     String type = navigator.GetAttribute("type", "");
     if (type != "application/opensearchdescription+xml")
         risultato = false;
     return risultato;
 }
开发者ID:Esriitalia,项目名称:VerA,代码行数:9,代码来源:ControlliSemplici.cs

示例6: ApplicationAtomXml

 public static bool ApplicationAtomXml(XPathNavigator navigator)
 {
     bool risultato = true;
     navigator.MoveToNextAttribute();
     String type = navigator.GetAttribute("type", "");
     if (type != "application/atom+xml")
         risultato = false;
     return risultato;
 }
开发者ID:Esriitalia,项目名称:VerA,代码行数:9,代码来源:ControlliSemplici.cs

示例7: ReadXml

        public void ReadXml(XPathNavigator node, XmlResolver resolver)
        {
            if (node.NodeType == XPathNodeType.Element) {

            if (node.MoveToFirstAttribute()) {
               do {
                  switch (node.LocalName) {
                     case "media-type":
                        this.MediaType = node.Value;
                        break;

                     case "boundary":
                        this.Boundary = node.Value;
                        break;
                  }
               } while (node.MoveToNextAttribute());

               node.MoveToParent();
            }

            if (node.MoveToChild(XPathNodeType.Element)) {

               XPathHttpMultipartItem currentItem = null;

               do {
                  if (node.NamespaceURI == XPathHttpClient.Namespace) {

                     switch (node.LocalName) {
                        case "header":
                           if (currentItem == null) {
                              currentItem = new XPathHttpMultipartItem();
                           }

                           currentItem.Headers.Add(node.GetAttribute("name", ""), node.GetAttribute("value", ""));
                           break;

                        case "body":
                           if (currentItem == null) {
                              currentItem = new XPathHttpMultipartItem();
                           }

                           currentItem.Body = new XPathHttpBody();
                           currentItem.Body.ReadXml(node, resolver);

                           this.Items.Add(currentItem);
                           currentItem = null;
                           break;
                     }
                  }

               } while (node.MoveToNext(XPathNodeType.Element));

               node.MoveToParent();
            }
             }
        }
开发者ID:skurdiukov,项目名称:myxsl,代码行数:56,代码来源:XPathHttpMultipart.cs

示例8: GetAssemblyVersion

 string GetAssemblyVersion(XPathNavigator nav)
 {
     if(nav.HasAttributes)
         nav.MoveToFirstAttribute();
     do
     {
         if (Utilities.Compare(nav.LocalName, "version"))
             return nav.Value;
     } while (nav.MoveToNextAttribute( ));
     return string.Empty;
 }
开发者ID:eleooo,项目名称:App,代码行数:11,代码来源:EleoooClient.aspx.cs

示例9: GetAttributes

 public static Dictionary<string, string> GetAttributes(XPathNavigator navigator)
 {
     if (!navigator.MoveToFirstAttribute())
         throw new DeserializationException("Node has no attributes: " + navigator.Name);
     Dictionary<string, string> attributes = new Dictionary<string, string>();
     do
     {
         attributes.Add(navigator.Name, navigator.Value);
     } while (navigator.MoveToNextAttribute());
     navigator.MoveToParent();
     return attributes;
 }
开发者ID:joaohortencio,项目名称:n2cms,代码行数:12,代码来源:XmlReader.cs

示例10: SettingsMappingWhatContents

		public SettingsMappingWhatContents (XPathNavigator nav, SettingsMappingWhatOperation operation)
		{
			_operation = operation;
      
			if (nav.HasAttributes) {	
				nav.MoveToFirstAttribute ();
				_attributes.Add (nav.Name, nav.Value);
	
				while (nav.MoveToNextAttribute ())
					_attributes.Add (nav.Name, nav.Value);
			}
		}
开发者ID:nlhepler,项目名称:mono,代码行数:12,代码来源:SettingsMappingWhat.cs

示例11: ReadXml

      public void ReadXml(XPathNavigator node) {

         if (node.MoveToFirstAttribute()) {

            do {
               if (String.IsNullOrEmpty(node.NamespaceURI)) {

                  switch (node.LocalName) {
                     case "method":
                        switch (node.Value) {
                           case "xml":
                              this.Method = XmlSerializationOptions.Methods.Xml;
                              break;

                           case "html":
                              this.Method = XmlSerializationOptions.Methods.Html;
                              break;

                           case "xhtml":
                              this.Method = XmlSerializationOptions.Methods.XHtml;
                              break;

                           case "text":
                              this.Method = XmlSerializationOptions.Methods.Text;
                              break;
                        }
                        break;

                     default:
                        break;
                  }
               }
            } while (node.MoveToNextAttribute());

            node.MoveToParent();
         }

         if (node.MoveToFirstChild()) {

            do {
               if (node.NodeType == XPathNodeType.Element || node.NodeType == XPathNodeType.Text) {
                  this.Content = node.Clone();
                  break;
               }

            } while (node.MoveToNext());

            node.MoveToParent();
         }
      }
开发者ID:nuxleus,项目名称:Nuxleus,代码行数:50,代码来源:XPathMailBody.cs

示例12: AddAttributeList

 private void AddAttributeList(XPathNavigator nav, ArrayList attrs)
 {
     if (nav.HasAttributes)
     {
         nav.MoveToFirstAttribute();
         do
         {
             if (!attrs.Contains(nav.Name))
             {
                 attrs.Add(nav.Name);
             }
         }
         while (nav.MoveToNextAttribute());
         nav.MoveToParent();
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:16,代码来源:XmlDocumentSchema.cs

示例13: TraceContext

		internal static void TraceContext(XPathNavigator context) {
			string output = "(null)";
			
			if (context != null) {
				context = context.Clone ();
				switch (context.NodeType) {
					case XPathNodeType.Element:
						output = string.Format("<{0}:{1}", context.Prefix, context.LocalName);
						for (bool attr = context.MoveToFirstAttribute(); attr; attr = context.MoveToNextAttribute()) {
							output += string.Format(CultureInfo.InvariantCulture, " {0}:{1}={2}", context.Prefix, context.LocalName, context.Value);
						}
						 output += ">";
						break;
					default:
						break;
				}
			}
	
			WriteLine(output);
		}
开发者ID:nobled,项目名称:mono,代码行数:20,代码来源:Debug.cs

示例14: Parse

		private void Parse(XPathNavigator listenerElement)
		{
			if (listenerElement.MoveToFirstAttribute())
			{
				do
				{
					switch (listenerElement.Name)
					{
						case "class":
							if (listenerElement.Value.Trim().Length == 0)
								throw new HibernateConfigException("Invalid listener element; the attribute <class> must be assigned with no empty value");
							clazz = listenerElement.Value;
							break;
						case "type":
							type = CfgXmlHelper.ListenerTypeConvertFrom(listenerElement.Value);
							break;
					}
				}
				while (listenerElement.MoveToNextAttribute());
			}
		}
开发者ID:ray2006,项目名称:WCell,代码行数:21,代码来源:ListenerConfiguration.cs

示例15: Parse

		private void Parse(XPathNavigator collectionCacheElement)
		{
			if (collectionCacheElement.MoveToFirstAttribute())
			{
				do
				{
					switch (collectionCacheElement.Name)
					{
						case "collection":
							if (collectionCacheElement.Value.Trim().Length == 0)
								throw new HibernateConfigException("Invalid collection-cache element; the attribute <collection> must be assigned with no empty value");
							collection = collectionCacheElement.Value;
							break;
						case "usage":
							usage = CfgXmlHelper.ClassCacheUsageConvertFrom(collectionCacheElement.Value);
							break;
						case "region":
							region = collectionCacheElement.Value;
							break;
					}
				}
				while (collectionCacheElement.MoveToNextAttribute());
			}
		}
开发者ID:pallmall,项目名称:WCell,代码行数:24,代码来源:CollectionCacheConfiguration.cs


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