Details
-
Type: Wish
-
Status: Open
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
New XStream has StaxWriter to write using XMLStreamWriter and StaxReader to read from XMLStreamReader.
I'd like to have classes to work with XMLEventWriter and XMLEventReader from StAX...
Well, a StaxEventReader is for the same reason not possible, why there exists no SaxReader:
XStream works on a stream-based parser model, while SAX is event-based. The steam based model implies, that the
caller consumes the individual tokens from the XML parser on demand, while in an event-based model the parser
controls the application flow on its own and will use callbacks to support client processing. The different
architecture makes it therefore impossible for XStream to use an event-driven XML parser.
All that can be implemented is a StaxEventWriter which is technically a HierarchicalStreamWriter of XStream but triggers an XMLEventReader from StAX. See SaxReader implementation.