JAXB

  • 网络Java API for XML Binding; 的工作原理; 绑定

JAXBJAXB

JAXB

Java API for XML Binding

JAXBJava API for XML Binding),提供了一个快速便捷的方式将Java对象与XML进行转换。在JAX-WS(Java的WebServic…

的工作原理

《Java Web整合开发王者归来》- 京东图书... ... 13.4.2 SAX 解析 13.5.2 JAXB 的工作原理 14.4.1 Struts 配置文件详解 ...

绑定

Java SE 6 的 XML 处理功能分为两个部分:XML 处理(JAXP)和 XML 绑定JAXB)。Java SE 6 平台提供的 XML 处理主要 …

绑定技术

绑定技术JAXB)JSR222即Java Architecture for XML Binding(JAXB)。JAXB的目的是便于Java程序进行Java类到XML文 …

1
Now, before all of you start to tell me that this isn't a problem, let me show you what JAXB does do to protect your data. 在您准备告诉我这不成为一个问题之前,先让我说明JAXB通过什么来保护您的数据。
2
Right off the bat, JAXB isn't going to be an option for you, as JAXB only accepts XML Schema as a constraint model for class generation. 毫无疑问,JAXB不在选择范围之列,因为它只接受XMLSchema作为约束模型来生成类。
3
While JAXB is only focused on a Java-to-XML binding, XML isn't the only kind of data being bound to SDO. JAXB仅关注Java到XML的绑定,而绑定到SDO的不仅仅是XML数据。
4
JAXB is robust enough to allow you to name anonymous types as you need to via the binding file. JAXB非常稳健,可允许您通过绑定文件来命名需要命名的匿名类型。
5
In fact, JAXB is probably just as flexible as either of the two previous methods shown in terms of setting up output properties. 事实上,JAXB在设置输出属性方面的灵活性与前面两种方法是不相上下的。
6
In closing, let me share with you my cheat sheet, the Ant setup I use to make all my classpath and JAXB samples easy. 最后让我们来分享我的一个秘技,用于轻松制作classpath和JAXB示例的Ant设置。
7
This cross-stack compatibility is the main benefit of using JAXB and JAX-WS, since it makes it easy for you to switch between stacks. 这种跨堆栈兼容性是使用JAXB和JAX-WS的主要优点,因为这便于在不同的堆栈之间切换。
8
These interfaces make JAXB-generated code fairly easy to use with existing documents. 这些接口使JAXB生成的代码可以相当容易地与现有文档一起使用。
9
The Castor developers also plan to support JAXB in Castor, probably using some sort of compatibility layer. Castor开发人员还计划在Castor中支持JAXB,可能是通过使用某类兼容性层来实现这一点。
10
It allows configuration of any XML binding mechanism like JAXB, SDO, Castor etc. by implementing the standard framework interface. 通过实现标准的框架接口,它支持任何XML绑定机制,如JAXB、SDO、Castor等。
11
Then in October, Sun provided a new beta version of the JAXB reference implementation, finally replacing the long outdated EA version. 接着在10月,Sun提供了JAXB参考实现新的beta测试版,最终它会替代过时已久的EA版本。
12
The data interchange model can be easily configured by using custom XML serializers, JAXB or any other object-to-XML conversion tools. 通过使用自定义XML序列化程序、JAXB或任何其他对象到XML转换工具,可以方便地配置数据交换模型。
13
Until the production release (currently planned for this quarter), JAXB is not a practical alternative for use in real projects. 在该产品发行版(目前计划在这个季度发布)之前,JAXB还无法用于实际项目中。
14
This goes on for quite a bit -- notice that JAXB creates a lot of classes for even a relatively simply XML Schema. 实在是有点太多了--注意,即使对于一个相当简单的XMLSchema,JAXB也创建了大量的类。
15
Java Architecture for XML Binding (JAXB): Provides a binding compiler and a runtime framework to map Java objects to XML documents. XML绑定的Java架构(JavaArchitectureforXMLBinding,JAXB):提供一个绑定的编译器和一个运行时框架将Java对象映射到XML文档。
16
Since this isn't an article on JAXB basics (for such articles, see Resources), I'll just let you see the code, shown in Listing 3. 因为这不是一篇关于JAXB基础的文章(这类文章请参阅参考资料),我仅仅把代码列在下面,如清单3所示。
17
A useful feature of JAXB is the ability to validate the source data against the associated schema as part of the unmarshalling operation. JAXB的有用特性之一是,在反编组操作过程中可以根据相关联的模式检验源数据。
18
You also need an XML Schema to generate classes and data structures from as you work with JAXB. 使用JAXB时还需要一个XMLSchema以生成类和数据结构。
19
This is to be expected in the case of Metro and CXF, since they both use the JAXB reference implementation for conversions. 这是Metro和CXF的预期结果,因为它们都使用JAXB参考实现来进行转换。
20
Zeus code generation is similar in usage to JAXB or Castor, with a command line tool provided to construct the necessary classes. 在用法上,Zeus代码生成类似于JAXB或Castor,它提供了命令行工具来构造所需要的类。
21
JAXB also handles CDATA sections a little differently than you might expect, but it does preserve semantic equivalence. JAXB还以和预期稍有不同的方式处理CDATA节,但确实保持了语义等价。
22
This article focuses on that process -- known as marshalling in the data binding world -- and in particular JAXB's marshalling capabilities. 本文重点讨论数据绑定世界中所谓的编组(marshalling)过程,特别是JAXB的编组能力。
23
JAXB introduces the concept of data binding, a correspondence between XML schemas and Java classes. JAXB引入了数据绑定的概念,即XML模式与Java类的对应关系。
24
Interested readers can find such an implementation in the JAXB reference implementation in Resources. 有兴趣的读者可以从参考资料中的JAXB参考实现中找到这样的实现。
25
In the long run, this should make it more adaptable than JAXB. 从长远来看,这将使它的适应性比JAXB更强。
26
Additionally, since JAX-WS uses JAXB for all data binding purposes, the jaxrpc-mapping file is no longer necessary. 另外,因为JAX-WS使用JAXB进行所有的数据绑定,所以不再需要jaxrpc-mapping文件。
27
Unlike JAXB, there is no real need of providing annotations for your data binding needs. 与JAXB不同的是,无需提供注释便可满足数据绑定需求。
28
Using JAXB, it constructs Java objects corresponding to the input XML elements and puts them in a HashMap. 通过使用JAXB,将构造与输入XML元素对应的Java对象,并将其放入到HashMap中。
29
JAXB binding classes are generated either with the command line tool xjc, or directly in the WebSphere Integration Developer environment. 用命令行工具xjc或在WebSphereIntegrationDeveloper环境中直接生成JAXB绑定类。
30
To use this file yourself, simply modify the paths to your own XML input files, as well as to your JAXB JAR files. 您要使用这个文件,只需要把路径改为您自己的XML输入文件,以及您的JAXBJAR文件。