用于Web服务响应的text/xml与application/xml之间有什么区别 [英] What's the difference between text/xml vs application/xml for webservice response

查看:249
本文介绍了用于Web服务响应的text/xml与application/xml之间有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这更多是关于text/xmlapplication/xml之间差异的一般问题. 我是写Web服务的新手(REST-Jersey).我一直在制作application/xml,因为它是我一直在学习的大多数教程/代码示例中所显示的内容,但是我最近发现了关于text/xml的信息,并想知道它的不同之处以及何时使用它在application/xml上?

This is more of a general question about the difference between text/xml and application/xml. I am fairly new to writing webservices (REST - Jersey). I have been producing application/xml since it is what shows up in most tutorials / code examples that I have been using to learn, but I recently found out about text/xml and was wondering what is different about it and when would you use it over application/xml?

推荐答案

这是一个古老的问题,但是现在可以从

This is an old question, but one that is frequently visited and clear recommendations are now available from RFC 7303 which obsoletes RFC3023. In a nutshell (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), except that
the "Type name" is "text".

这篇关于用于Web服务响应的text/xml与application/xml之间有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆