コード例 #1
0
        private AdferoVideoPlayer GetVideoPlayerFromXmlString(string xml)
        {
            AdferoVideoPlayer videoPlayer = new AdferoVideoPlayer();
            XmlDocument       doc         = new XmlDocument();

            doc.LoadXml(xml);

            foreach (XmlNode n in doc.SelectNodes("//player/node()"))
            {
                switch (n.Name)
                {
                case "embedCode":
                    videoPlayer.EmbedCode = n.InnerText;
                    break;

                default:
                    break;
                }
            }

            return(videoPlayer);
        }
コード例 #2
0
        private AdferoVideoPlayer GetVideoPlayerFromXmlString(string xml)
        {
            AdferoVideoPlayer videoPlayer = new AdferoVideoPlayer();
            XmlDocument doc = new XmlDocument();
            doc.LoadXml(xml);

            foreach (XmlNode n in doc.SelectNodes("//player/node()"))
            {
                switch (n.Name)
                {
                    case "embedCode":
                        videoPlayer.EmbedCode = n.InnerText;
                        break;

                    default:
                        break;
                }
            }

            return videoPlayer;
        }