Traditionally I have been using JAXP or JDOM for handling xml payloads in java where we use the DOM or SAX api for handling xml. Alternatively there are java2xml and viceversa api libraries available like JAXB, Castor and XMLBeans. I was wondering when to go for raw xml handling using libraries like JAXP , JDOM and when to resort to java-xml bridging toolkits like castor.
Of course if there is a reason to use more abstract binding, then it depends from special needs. Sometimes it is needed to specify the structure of the xml data. Sometimes it is needed to handle the inheritance of data beans. The large byte arrays and multi part data content - is a special topic. The validation of values is also form time to time being the topic to discuss when selecting the tool.