Announcement Announcement Module
No announcement yet.
Spring OXM Efficient Marshalling Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring OXM Efficient Marshalling

    In the StaxEventItemReader of Spring OXM we have a moveCursorToNextFragment(....) method which moves the cursor to the next element. In the documentation of the class it says that this method needs to be overriden if we want to deal with composite fragments .

    I have a case where XML is


    This Y can even be a million. So fragmentRootElement name is Y.
    However I want to read some attributes of X also. For that doRead() method can be overriden , but for that I need to override the whole class because lot of member variables used in doRead is private.

    T mappedFragment = (T) unmarshaller.unmarshal(newStaxSource(fragmentReade r));
    item = mappedFragment;

    Any better method.