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


C# XPathNavigator.ToString方法代码示例

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


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

示例1: ConceptualLinkInfo

        //=====================================================================

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="node">The XPath navigator node from which to load the link settings</param>
        /// <exception cref="ArgumentNullException">This is thrown if the node parameters is null</exception>
        public ConceptualLinkInfo(XPathNavigator node)
        {
            string target;
            int pos;

            if(node == null)
                throw new ArgumentNullException("node");

            target = node.GetAttribute("target", string.Empty);

            // EFW - Added support for an optional anchor name in the target
            pos = target.IndexOf('#');

            if(pos != -1)
            {
                this.Anchor = target.Substring(pos);
                target = target.Substring(0, pos);
            }

            this.Target = target.ToLowerInvariant();

            // EFW - Trim off unwanted whitespace
            this.Text = node.ToString().Trim();
        }
开发者ID:julianhaslinger,项目名称:SHFB,代码行数:31,代码来源:ConceptualLinkInfo.cs

示例2: HiToTextEntryHeaderName

 public HiToTextEntryHeaderName(XPathNavigator path)
 {
     /*
     XPathNodeIterator ni = path.Select("Name");
     this.Value = ni.Current.Value;
     if (ni.Current.HasAttributes)
     {
         this.NumberOfBytesSpecified = true;
         this.NumberOfBytes = Convert.ToInt32(ni.Current.GetAttribute("NumberOfBytes", string.Empty));
     }
       */
       this.Value = path.ToString(); //Safe? TODO It seems we can only get to this level with a single value in path (a file extension)
 }
开发者ID:johkelly,项目名称:HiToText_Mono,代码行数:13,代码来源:HiToText.XPathLoad.cs

示例3: Create

 public static ConceptualLinkInfo Create (XPathNavigator node) {
     if (node == null) throw new ArgumentNullException("node");
     
     ConceptualLinkInfo info = new ConceptualLinkInfo();
     
     info.target = node.GetAttribute("target", String.Empty);
     info.text = node.ToString();
     
     return(info);
 }
开发者ID:hnlshzx,项目名称:DotNetOpenAuth,代码行数:10,代码来源:ResolveConceptualLinksComponent.cs

示例4: HiToTextEntryFieldNameSpecialUtilization

 public HiToTextEntryFieldNameSpecialUtilization(XPathNavigator path)
 {
     if (!path.GetAttribute("Function", string.Empty).Equals(string.Empty))
         this.Function = path.GetAttribute("Function", string.Empty);
     /*
     XPathNodeIterator ni = path.Select("SpecialUtilization");
     this.Value = ni.Current.Value;*/
     this.Value = path.ToString(); // Safe? TODO
 }
开发者ID:johkelly,项目名称:HiToText_Mono,代码行数:9,代码来源:HiToText.XPathLoad.cs

示例5: MoveTo

		/// <summary>
		/// See <see cref="XPathNavigator.MoveTo"/>.
		/// </summary>
		public override bool MoveTo(XPathNavigator other) 
		{
			bool res = _navigator.MoveTo(other);
			System.Diagnostics.Debug.WriteLine("MoveTo(" + (other != null ? other.ToString() : "null") + ") = " + res);
			return res;
		}
开发者ID:zanyants,项目名称:mvp.xml,代码行数:9,代码来源:DebuggingXPathNavigator.cs

示例6: IsSamePosition

		/// <summary>
		/// See <see cref="XPathNavigator.IsSamePosition"/>.
		/// </summary>
		public override bool IsSamePosition(XPathNavigator other) 
		{
			bool res = _navigator.IsSamePosition(other);
			System.Diagnostics.Debug.WriteLine("IsSamePosition(" + (other != null ? other.ToString() : "null") + ") = " + res);
			return res;
		}
开发者ID:zanyants,项目名称:mvp.xml,代码行数:9,代码来源:DebuggingXPathNavigator.cs

示例7: NonVuoto

 public static bool NonVuoto(XPathNavigator navigator)
 {
     Boolean risultato = true;
     try
     {
         String contenuto = navigator.ToString();
         if (contenuto == "")
             risultato = false;
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
     return risultato;
 }
开发者ID:Esriitalia,项目名称:VerA,代码行数:15,代码来源:ControlliSemplici.cs

示例8: Email

        public static bool Email(XPathNavigator navigator)
        {
            Boolean risultato = true;
            String email = navigator.ToString();
            String MatchEmailPattern =
            @"^(([\w-]+\.)+[\w-]+|([a-zA-Z]{1}|[\w-]{2,}))@"
             + @"((([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?
                [0-9]{1,2}|25[0-5]|2[0-4][0-9])\."
             + @"([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?
                [0-9]{1,2}|25[0-5]|2[0-4][0-9])){1}|"
             + @"([a-zA-Z0-9]+[\w-]+\.)+[a-zA-Z]{1}[a-zA-Z0-9-]{1,23})$";

            Regex regex = new Regex(MatchEmailPattern);
            Match match = regex.Match(email);

            if (!match.Success)
                risultato = false;
            return risultato;
        }
开发者ID:Esriitalia,项目名称:VerA,代码行数:19,代码来源:ControlliSemplici.cs

示例9: Create

        /// <summary>
        /// This is used to create a conceptual link based on the information
        /// in the supplied XPath navigator.
        /// </summary>
        /// <param name="node">The XPath navigator node from which to load the
        /// link settings.</param>
        /// <returns>A conceptual link info object</returns>
        /// <exception cref="ArgumentNullException">This is thrown if the
        /// node parameters is null.</exception>
        public static ConceptualLinkInfo Create(XPathNavigator node)
        {
            string target;
            int pos;

            if(node == null)
                throw new ArgumentNullException("node");

            ConceptualLinkInfo info = new ConceptualLinkInfo();
            target = node.GetAttribute("target", string.Empty);

            // EFW - Added support for an optional anchor name in the target
            pos = target.IndexOf('#');
            if(pos != -1)
            {
                info.anchor = target.Substring(pos);
                target = target.Substring(0, pos);
            }

            info.target = target;

            // EFW - Trim off unwanted whitespace
            info.text = node.ToString().Trim();
            return info;
        }
开发者ID:codemonster234,项目名称:scbuilder,代码行数:34,代码来源:ConceptualLinkInfo.cs


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