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


C# XPathNavigator.MoveToFollowing方法代码示例

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


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

示例1: GrabBackDropUrls

        public IList<string> GrabBackDropUrls(XPathNavigator nav)
        {
            List<string> urls = new List<string>();
            XPathNodeIterator nIter = nav.SelectChildren("backdrop", "");
            if (nav.MoveToFollowing("backdrop", ""))
            {
                XPathNavigator localNav = nav.CreateNavigator();
                nav.MoveToParent();
                for (int i = 0; i < nIter.Count; i++)
                {
                    if (localNav.GetAttribute("size", "").ToUpperInvariant().Equals("original".ToUpperInvariant()))
                        urls.Add(localNav.Value);

                    localNav.MoveToNext();
                }
            }
            return urls;
        }
开发者ID:peeboo,项目名称:open-media-library,代码行数:18,代码来源:TheMovieDbBackDropDownloader.cs

示例2: MoveToFollowing

 /// <summary>
 /// Reposition the navigator on the next following element with a matching name.
 /// </summary>
 public override bool MoveToFollowing(XPathNavigator navigator, XPathNavigator navEnd) {
     return navigator.MoveToFollowing(this.localName, this.namespaceUri, navEnd);
 }
开发者ID:uQr,项目名称:referencesource,代码行数:6,代码来源:XmlNavigatorFilter.cs

示例3: GetXmlNamespaceManager

        /// <summary>
        /// Reads an XPathNavigator object and returns an XmlNamespaceManager containing all namespaces found within it. The default namespace is x.
        /// </summary>
        /// <param name="xpn">The XPathNavigator to be assessed for namespaces</param>
        /// <returns></returns>
        public static XmlNamespaceManager GetXmlNamespaceManager(XPathNavigator xpn)
        {
            xpn.MoveToFollowing(XPathNodeType.Element);

            XmlNamespaceManager xmlnsm = new XmlNamespaceManager(xpn.NameTable);
            xmlnsm.AddNamespace("x", xpn.NamespaceURI);

            foreach (KeyValuePair<string, string> xns in xpn.GetNamespacesInScope(XmlNamespaceScope.All))
                xmlnsm.AddNamespace(xns.Key, xns.Value);

            return xmlnsm;
        }
开发者ID:wduffy,项目名称:Toltech.Mvc,代码行数:17,代码来源:Xml.cs


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