jaxb bindingx.xml“导致过多的目标节点” [英] jaxb bindingx.xml "results in too many target nodes"

查看:69
本文介绍了jaxb bindingx.xml“导致过多的目标节点”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为每种类型的元素制作一个适配器,因此我创建了一个bindings.xml文件:

I'm trying to make just one adapter for every type of element, so I created a bindings.xml file:

<jxb:bindings node="//xs:attribute[@type='Id']"



<那么,我的目的是解决Id类型的每个属性。
问题是xjc告诉我太多目标节点(3)......但它正是我想要的!

so, my intention is to address to every attribute of type "Id". Problem is that xjc tells me "too many target nodes(3)" ... but it's just what I want!!

推荐答案

尝试添加multiple =true属性:

Try to add multiple="true" attribute:

<jxb:bindings multiple="true" node="//xs:attribute[@type='Id']"

这篇关于jaxb bindingx.xml“导致过多的目标节点”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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