Skip to main contentdfsdf

Dmitry Serebrennikov's List: XML for Object Externalization

    • Developers familiar with the Simple API for XML Parsing (SAX) approach to processing XML documents will recognize that the Digester provides a higher level, more developer-friendly interface to SAX events, because most of the details of navigating the XML element hierarchy are hidden -- allowing the developer to focus on the processing to be performed.
    • The Betwixt library provides an XML introspection mechanism  for mapping beans to XML in a flexible way. It is implemented using an   XMLIntrospector and XMLBeanInfo classes which are similar to the standard   Introspector and BeanInfo from the Java Beans specification.

       

        Betwixt provides a way of turning beans into XML as well as automatically   generating digester rules in a way that can be customized on a per type   manner in the same way that the BeanInfo mechanism can be used to customize   the default introspection on a java object.

  • May 28, 09

    More on smooks 1.1. Current version is 1.2 - keep in mind.

    • Smooks works by converting a stream of structured/hierarchical data into a stream of "events" that can then be targeted with "Visitor Logic" for analysis, or to produce a result (optional).
    • Create and populate Java Object models/graphs from any of the supported data formats (i.e. not just XML), in a standard way. 

    1 more annotation...

  • May 28, 09

    Interesting - java-to-java transformations, validations simple and business-rule-based, persistence "cartridge" with JPA support.

  • May 28, 09

    Spring has support for marshaling/unmarshaling. Go figure. "Of course it's in Spring!"

    • Ease of configuration.   Spring's bean factory makes it easy to configure marshallers, without needing to construct JAXB context,  JiBX binding factories, etc. The marshallers can be configured as any other bean in your application  context. Additionally, XML Schema-based configuration is available for a number of marshallers, making  the configuration even simpler. 

      Consistent Interfaces.   Spring's O/X mapping operates through two global interfaces: the   Marshaller and Unmarshaller interface.   These abstractions allow you to switch O/X mapping   frameworks with relative ease, with little or no changes required on the classes that do the   marshalling. This approach has the additional benefit of making it possible to do XML marshalling with   a mix-and-match approach (e.g. some marshalling performed using JAXB, other using XMLBeans) in a   non-intrusive fashion, leveraging the strength of each technology. 

      Consistent Exception Hierarchy.   Spring provides a conversion from exceptions from the underlying O/X mapping tool to its own exception  hierarchy with the XmlMappingException as the root exception. As can be expected,  these runtime exceptions wrap the original exception so no information is lost. 

    • <oxm:jaxb2-marshaller id="marshaller" contextPath="org.springframework.ws.samples.airline.schema"/>

      • Example

    5 more annotations...

1 - 6 of 6
20 items/page
List Comments (0)