title: How do I use application/xml as compared to text/xml?
body: <p>In the web service I've been working on, I've been displaying text to the screen through methods like so in HTML:</p>
  
  <pre><code>@GET
  @Produces(MediaType.TEXT_HTML)
  public String sayHtmlHello() 
  {
  /**Do some stuff
      return "&lt;html&gt; " + "&lt;title&gt;" + "Hello" + "&lt;/title&gt;"
              + "&lt;body&gt;&lt;h1&gt;" + "Hello World" + "&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;";
  }
  </code></pre>
  
  <p>which displays to the screen quite nicely.  In order to fit the project description of the project I'm working on, I've been working on moving toward an XML output by building a document, transforming it to a string, and returning the string.  Using @Produces(MediaType.TEXT_XML) shows the XML tree like I would expect.</p>
  
  <p>My question comes here: I need to be able to pass this XML data on using what the project description calls a Response Content-Type Header of application/xml;charset=UTF-8.  So what would I need to do to accomodate using @Produces(MediaType.APPLICATION_XML) instead of @Produces(MediaType.TEXT_XML)?</p>