【发布时间】:2013-07-23 06:40:57
【问题描述】:
我有一个 xsd 注释,我正试图将 Marshal 转换为 java 对象。我希望 java 以 BigDecimal 结束它的价值。我在 xsd 中输入什么来使它做到这一点?我正在使用一个 xjc 蚂蚁任务
<xjc schema="my.xsd" destdir="generated" header="false" extension="true" />
这里是相关的xsd——
<complexType name="Size">
<attribute name="height" type="BigDecimal"></attribute> <!-- this is wrong-->
</complexType>
我想为生成的类结束这个 -
public class Size {
@XmlAttribute(name = "height")
protected BigDecimal height;
}
【问题讨论】:
标签: java xml jaxb xsd bigdecimal