title: In ASP.NET MVC, How to return an xml document to a View
body: <p>I'd like some guidance in returning an XML doc from a controller to a view.
  In my view, I'd like to traverse the XML doc using JQuery. There are plenty of online examples using JQuery for this use.</p>
  
  <p>I have a PortfolioList() Controller below, which right now just returns the view, but I would like to figure out how to RETURN THE XML RESPONSE. You'll noticed below that I'm writing the XML response to a local file just for testing purposes...</p>
  
  <p>Do I need to cleanly create a model for this ?</p>
  
  <pre><code>    public ActionResult PortfolioList()
      {
          XmlDocument xmlResponse = new XmlDocument();
          XmlDocument xmlRequest = new XmlDocument();
  
          bool rzInitialized = nitializeRz();
          if (rzInitialized == false)
          {
              ViewBag.Message = "Rz Init has failed. Check if Rz is running";
              return View();
          }
          bool rzConnected = ConnectToRz();    
  
          ViewBag.Message = "Here you may view a list of portfolios and exposures.";
  
          // Build Portfolio Select request here !
          RequestBuilder rzRequest = new RequestBuilder();
  
          // REQUEST FOR PORTFOLIOS !
          string portfoliosRequest = rzRequest.PortfoliosRequest("Portfolios");
          string **portfoliosResponse** = RzClient.sendRequest(portfoliosRequest, false);
  
          // DEBUG REQUESTS !!
          if (Debugflag)
          {
              rzRequest.DebugOutput("portfolios", portfoliosRequest, portfoliosResponse);
          }
          DisconnectFromRz();
  
          return View("PortfolioList");
      }
  </code></pre>