现在的位置: 首页 > 综合 > 正文

Castor Introduction

2013年09月16日 ⁄ 综合 ⁄ 共 772字 ⁄ 字号 评论关闭

Basic Idea:

Java Bean ---- (marshal) XML Stream/Document

XML Stream/Document ----(unmarshal) Java Bean

Castor XML is an XML databinding framework. Unlike the two main XML APIs, DOM (Document Object Model) and SAX (Simple API for XML) which deal with the structure of an XML document, Castor enables one to deal with the data defined in an XML document through an object model which represents that data.

Castor XML can marshal almost any "bean-like" Java Object to and from XML. In most cases the marshalling framework uses a set of ClassDescriptors and FieldDescriptors to describe how an Object should be marshalled and unmarshalled from XML.

For those not familiar with the terms "marshal" and "unmarshal", it's simply the act of converting a stream (sequence of bytes) of data to and from an Object. The act of "marshalling" consists of converting an Object to a stream, and "unmarshalling" from a stream to an Object.

 

抱歉!评论已关闭.