Question: I have been learning on jax-rs. My problem is i don't know how to choose either application/XML or text/XML even i read more articles about them in Internet. Can anyone describe it simply like what application/XML support and not? why I should use text/XML?

Answer: 
The `text/xml` media type is an **alias** for the `application/xml` media type.

Check the [RFC 7303](https://www.rfc-editor.org/rfc/rfc7303) for details:

> 
> [**9.1. application/xml Registration**](https://www.rfc-editor.org/rfc/rfc7303#section-9.1)
> 
> 
> Type name: application
> 
> 
> Subtype name: xml
> 
> 
> [...]
> 
> 
> 

> 
> [**9.2. text/xml Registration**](https://www.rfc-editor.org/rfc/rfc7303#section-9.2)
> 
> 
> The registration information for `text/xml` is in all respects the same
> as that given for application/xml above ([Section 9.1](https://www.rfc-editor.org/rfc/rfc7303#section-9.1)), except that
> the "Type name" is "text".
> 
> 
> 

In JAX-RS, you can use the following to support both:

```java
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.TEXT_XML })
public Response foo() {
    ...
}

```
[w3.org](https://www.w3.org//2006/02/son-of-3023/draft-murata-kohn-lilley-xml-04.html#textxml) recommendation is to use `application/xml`

`text/xml` is already deprecated