1
我正在測試MOXy 2.5.0 RC1。元帥行爲差異
我編組以下字符串:
<c r="C3" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
<v>20</v>
</c>
它由https://github.com/plutext/docx4j/blob/master/src/xlsx4j/java/org/xlsx4j/sml/Cell.java
通知不存在任何@XmlRootElement註釋
隨着參考實施方式中,結果的表示,如所預期,是:
javax.xml.bind.MarshalException
- with linked exception:
[com.sun.istack.internal.SAXException2: unable to marshal type "org.xlsx4j.sml.Cell" as an element because it is missing an @XmlRootElement annotation]
at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:317)
at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:243)
at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:96)
at org.docx4j.XmlUtils.marshaltoString(XmlUtils.java:507)
With MOXy,結果是:
<v>20</v>
這是已知問題嗎?我沒有試過2.4.2 RC1。
感謝..
感謝您的回答。我會思考其中的含義。目前,它比任何事情都更令人驚訝...如果包含2個孩子,並且用戶正在編組DOM節點,那麼會發生什麼? –
JasonPlutext
2013-05-05 03:06:03