Xml XStream在Spring MVC控制器响应中添加的奇怪名称空间
有人知道我为什么要在XML节点上为属性“object”设置名称空间吗 它应该是Xml XStream在Spring MVC控制器响应中添加的奇怪名称空间,xml,spring-mvc,namespaces,xstream,Xml,Spring Mvc,Namespaces,Xstream,有人知道我为什么要在XML节点上为属性“object”设置名称空间吗 它应该是JeffF Cross。调试模式下的属性看起来很好,不包含任何额外数据,是一个字符串。这在SpringMVC中使用Xstream作为序列化程序 <?xml version="1.0" encoding="UTF-8" standalone="yes"?><getMemberActivitiesResponse><validator/><activities><lis
JeffF Cross
。调试模式下的属性看起来很好,不包含任何额外数据,是一个字符串。这在SpringMVC中使用Xstream作为序列化程序
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><getMemberActivitiesResponse><validator/><activities><list>
<object xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">JeffF Cross</object>
<validator/><actor>MichaelL FlynnN</actor><actorId>1</actorId><context>Cisco Blogs</context><contextId>1</contextId><dateCreated>3/24/2011 12:00 AM</dateCreated><id>1</id><imageId>9401</imageId><imagePath>http://localhost:8080/Web/resources/assets/users/default.jpgk</imagePath><objectId>54</objectId><verb>is following</verb><verbId>1</verbId></list><total>1</total></activities></getMemberActivitiesResponse>
杰夫克罗斯
MichaelL Flynn1思科博客13/24/2011年12:00 AM19401http://localhost:8080/Web/resources/assets/users/default.jpgk54is 以下11
我通过将属性“object”重命名为“directobject”解决了这个问题。似乎“object”是XStream无法正确解析的关键字。XStream做了所有你不想做的奇怪事情。不太好。