當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。