Announcement Announcement Module
Collapse
No announcement yet.
exclude xml elements in XStreamMarshaller Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • exclude xml elements in XStreamMarshaller

    Hello All,

    Is it possible to configure the XStreamMarshaller to exclude tags from an xml file /fragment, so it is not mapped to an object.field?

    For example:
    <ProductType>
    <TouroperatorName>
    <ProductDetails> -- should be excluded

    Object:
    public class ProductType
    private touroperatorName;
    // No field productDetails

    Even if I have to use another library (i.e. Castor) it is oke to me

    Paul

  • #2
    I assume you mean "Unmarshaller" (the thing that turns xml into objects)? Short answer: I don't know. Long answer: ask someone on the Spring WS forum.

    Comment


    • #3
      Looking at the XStream documentation it looks like you would have to remove the <ProductDetails> element or add a productDetails field but mark it as transient to avoid having it deserialized.

      Comment

      Working...
      X