繁体   English   中英

可以在根元素中包含globalBinding标签吗?

[英]Can globalBinding tag be included in the root element?

我有以下外部绑定文件-

<jxb:bindings version="1.0"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
jxb:extensionBindingPrefixes="xjc"
>
<jxb:bindings schemaLocation="xyz" node="/xs:schema">
<jxb:globalBindings>
<xjc:serializable/>
</jxb:globalBindings>
<jxb:schemaBindings>
<jxb:package name="abc"/>
</jxb:schemaBindings>
</jxb:bindings>
</jxb:bindings>

我需要将jxb:globalBindings标记放置在根jxb:bindings中

是的,那是正确的地方

a <bindings> element can contain arbitrary number of binding declarations or nested <bindings> elements

http://java.sun.com/xml/ns/jaxb/bindingschema_1_0.xsd

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM