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;
}
}
}