对于声明为nillable的字段,我发送什么XML?

Ran*_*and 1 xml xsd xml-nil

我有一个带有REST样式接口的应用程序,它通过POST从客户端获取XML文档.此应用程序使用Java编写,并使用XML bean处理发布的消息.

消息中字段的XML模式定义如下所示:

<xs:element name="value" type="xs:string" nillable="true" />
Run Code Online (Sandbox Code Playgroud)

如何发送符合此规范的空值?

我发送<value xsi:nil="true" /> 但这导致XML解析器barf.

aar*_*nsw 15

怎么样<value xsi:nil="true"></value>?这就是规范中的内容.