Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the Java framework Smooks 1.2 that handles XML and non-XML

2025-04-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article shows you how to deal with XML and non-XML Java framework Smooks 1.2, the content is concise and easy to understand, can definitely brighten your eyes, through the detailed introduction of this article, I hope you can get something.

The Smooks 1.2 framework can be used for the conversion of various data formats: XML to XML,CSV to XML,EDI to XML,XML to EDI,XML to CSV,Java to XML,Java to EDI,Java to CSV,Java to Java,XML to Java,EDI to Java, etc.

Not long ago, the Smooks 1.2 framework version was released, this time adding a number of interesting new features:

EDIFACT Java compiler (EJC): EJC greatly simplifies binding EDI data to Java object graph,EJC, similar to JAXBs XJC.

Support entity persistence framework: reuse your entity persistence resources (such as Hibernate, iBATIS, any JPA-compatible resources) to adhere to and enrich messages in any format. Access a database and use its query language, or CRUD method, to read / write to the database.

Validation: support for Data Field level validation, using regular expressions, or Business Rule compliance validation, using MVEL expressions.

Easy CSV processing: with a simple XML configuration, you can bind CVS records to java objects in minutes, or use a simpler programmatic API.

Programmatic configuration is not Smooks's strength to improve Programmatic API:Smooks versions prior to 1.2, but significant improvements have been made in version 1.2. Many of the features of Smooks can be leveraged through java without the need to write XML.

There are two ways to use the Smooks 1.2 framework, and you can use either of them or a combination of them:

Pattern 1: you can fully immerse yourself in Smooks and write your own custom visitor logic event handler that can be used to handle specific events in a data source event stream. To use this mode, you must be familiar with the core API.

Pattern 2: you can reuse out-of-the-box solutions provided by Smooks distributions, the number of which is growing. In this mode, you only need to reuse components created by others and reconfigure them to deal with your data source, for example, by configuring some parameters to generate the Java object model from the EDI data source.

The above is how the Java framework Smooks 1.2, which deals with XML and non-XML, is like. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report