Domanda

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!

È stato utile?

Soluzione

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:

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top