문제

Is it possible to use JAXB Binder interface with StAX parser. I saw all examples saying that it needs a DOM parser to work with. The XML I am working with is too huge to fit in memory so I cant't use DOM. Is there any other alternative of modifying the XML fragment in place and marshal it?

Thanks in advance!

도움이 되었습니까?

해결책

Short Answer

It is not possible to use JAXB's Binder with StAX

(Slightly) Longer Answer

A JAXB Binder is used to sync changes between XML infoset nodes and JAXB objects. The only XML info set nodes that are required to be supported by a JAXB (JSR-222) implementation are instances of org.w3c.dom.Node. StAX doesn't really fit this model, and wouldn't work well with Binder methods like:

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top