GetXmlDocument() public method

public GetXmlDocument ( [ format ) : XmlDocument
format [
return Windows.Data.Xml.Dom.XmlDocument
Example #1
0
        public FeedItem(SyndicationItem si)
        {
            _si = si;
            _title = si.Title.Text;
            _summary = si.Summary.Text;

            var doc = si.GetXmlDocument(SyndicationFormat.Rss20);
            var nodes = doc.DocumentElement.GetElementsByTagName("content");
            if (nodes.Length > 0)
            {
                var node = (XmlElement)nodes.First();
                var typeAttr = (XmlAttribute)node.Attributes.GetNamedItem("type");
                if (typeAttr != null && typeAttr.Value.Equals("image/jpeg"))
                {
                    typeAttr = (XmlAttribute)node.Attributes.GetNamedItem("url");
                    if (typeAttr != null)
                    {
                        _imageUri = new Uri(typeAttr.Value);
                    }
                }
            }

            if (si.Links.Count > 0)
            {
                _link = si.Links[0].Uri;
            }
        }