Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml XStream在Spring MVC控制器响应中添加的奇怪名称空间_Xml_Spring Mvc_Namespaces_Xstream - Fatal编程技术网

Xml XStream在Spring MVC控制器响应中添加的奇怪名称空间

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

有人知道我为什么要在XML节点上为属性“object”设置名称空间吗

它应该是
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做了所有你不想做的奇怪事情。不太好。