Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

XmlDocument().Load(requestUrl)

$
0
0

In earlier version of asp.net have this code to load a xml string from internet: Now I get an compiler error on the LOAD(requestURL) saying "Can not convert from string to system.io.stream. Any ide what this could be. Thanks.

using System;
using System.Collections.Generic;
using System.Xml;
using System.Net.Http;
using System.Net;
using WebZenter.Models.Indeed;
using WebZenter.Models.FrameWork;

string requestUrl = "http://api.xxxxxx.com/xxxx/yyyyyyyyyy" +
                                 String.Format("&v={0}", 2) +
                                 String.Format("&q={0}", WebUtility.HtmlEncode(indeedSearchModel.What.Replace(" ", "+"))) +
                                 String.Format("&l={0}", WebUtility.HtmlEncode(indeedSearchModel.Where.Replace(" ","+"))) +
                                String.Format("&sort={0}", indeedSearchModel.Sort) +
                                String.Format("&radius={0}", indeedSearchModel.Radius));

XmlDocument doc = new XmlDocument();
doc.Load(requestUrl);


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>