Windows.Data.Xml.Dom.XmlDocument.SelectNodesNS C# (CSharp) Method

SelectNodesNS() public method

public SelectNodesNS ( [ xpath, [ namespaces ) : XmlNodeList
xpath [
namespaces [
return XmlNodeList
		public extern XmlNodeList SelectNodesNS([In] string xpath, [Variant] [In] object namespaces);
		public extern string GetXml();

Usage Example

Beispiel #1
0
        private void ParseFeedDoc(XmlDocument xmlDoc, Uri baseUri, bool includeTitle, ref string homepageUrl, ref string title)
        {
            if (includeTitle)
            {
                XmlElement titleEl = xmlDoc.SelectSingleNodeNS(@"atom:feed/atom:title", _nsMgr.ToNSMethodFormat()) as XmlElement;
                if (titleEl != null)
                {
                    title = _atomVer.TextNodeToPlaintext(titleEl);
                }
            }

            foreach (XmlElement linkEl in xmlDoc.SelectNodesNS(@"atom:feed/atom:link[@rel='alternate']", _nsMgr.ToNSMethodFormat()))
            {
                IDictionary contentTypeInfo = MimeHelper.ParseContentType(linkEl.GetAttribute("type"), true);
                switch (contentTypeInfo[""] as string)
                {
                case "text/html":
                case "application/xhtml+xml":
                    homepageUrl = XmlHelper.GetUrl(linkEl, "@href", baseUri);
                    return;
                }
            }
        }
All Usage Examples Of Windows.Data.Xml.Dom.XmlDocument::SelectNodesNS