- 浏览: 1319291 次
- 性别:
- 来自: 广州
文章分类
- 全部博客 (351)
- Java General (37)
- .net General (2)
- Linux Toy (55)
- Oracle (81)
- Mysql (11)
- Programer Career (12)
- Oh, my living ! (2)
- Shell Script (8)
- Web Service (0)
- Linux Server (22)
- Php/Python/Perl (3P) (2)
- Javascript General (5)
- Saleforce Apex Dev (2)
- Web General (5)
- Xen & VM tech. (17)
- PSP (13)
- OpenSolaris (34)
- php (1)
- RAI/flex/action script (16)
- asterisk/CTI (7)
- 交互设计 (6)
- English (3)
- Lucene (1)
最新评论
-
GuolinLee:
markmark
JVM调优总结 -Xms -Xmx -Xmn -Xss -
di1984HIT:
写的太好啊。
JVM调优总结 -Xms -Xmx -Xmn -Xss -
javajdbc:
javajdbc 写道
JVM调优总结 -Xms -Xmx -Xmn -Xss -
javajdbc:
...
JVM调优总结 -Xms -Xmx -Xmn -Xss -
alvin198761:
非常感谢,国外的被封杀了,你这里还有一份
How to Convert An Image-Based Guest To An LVM-Based Guest
JAXB Architecture
This section describes the components and interactions in the JAXB processing model.
Architectural Overview
Figure 17-1 shows the components that make up a JAXB implementation.
Figure 17-1 JAXB Architectural Overview
A JAXB implementation consists of the following architectural components:
-
Schema compiler: Binds a source schema to a set of schema-derived program elements. The binding is described by an XML-based binding language.
-
Schema generator: Maps a set of existing program elements to a derived schema. The mapping is described by program annotations.
-
Binding runtime framework: Provides unmarshalling (reading) and marshalling (writing) operations for accessing, manipulating, and validating XML content using either schema-derived or existing program elements.
The JAXB Binding Process
Figure 17-2 shows what occurs during the JAXB binding process.
Figure 17-2 Steps in the JAXB Binding Process
The general steps in the JAXB data binding process are:
-
Generate classes: An XML schema is used as input to the JAXB binding compiler to generate JAXB classes based on that schema.
-
Compile classes: All of the generated classes, source files, and application code must be compiled.
-
Unmarshal: XML documents written according to the constraints in the source schema are unmarshalled by the JAXB binding framework. Note that JAXB also supports unmarshalling XML data from sources other than files/documents, such as DOM nodes, string buffers, SAX Sources, and so forth.
-
Generate content tree: The unmarshalling process generates a content tree of data objects instantiated from the generated JAXB classes; this content tree represents the structure and content of the source XML documents.
-
Validate (optional): The unmarshalling process optionally involves validation of the source XML documents before generating the content tree. Note that if you modify the content tree in Step 6, below, you can also use the JAXB Validate operation to validate the changes before marshalling the content back to an XML document.
-
Process content: The client application can modify the XML data represented by the Java content tree by means of interfaces generated by the binding compiler.
-
Marshal: The processed content tree is marshalled out to one or more XML output documents. The content may be validated before marshalling.
More about Unmarshalling
Unmarshalling provides a client application the ability to convert XML data into JAXB-derived Java objects.
More about Marshalling
Marshalling provides a client application the ability to convert a JAXB-derived Java object tree back into XML data.
By default, the Marshaller uses UTF-8 encoding when generating XML data.
Client applications are not required to validate the Java content tree before marshalling. There is also no requirement that the Java content tree be valid with respect to its original schema to marshal it back into XML data.
More about Validation
Validation is the process of verifying that an XML document meets all the constraints expressed in the schema. JAXB 1.0 provided validation at unmarshal time and also enabled on-demand validation on a JAXB content tree. JAXB 2.0 only allows validation at unmarshal and marshal time. A web service processing model is to be lax in reading in data and strict on writing it out. To meet that model, validation was added to marshal time so one could confirm that they did not invalidate the XML document when modifying the document in JAXB form.
发表评论
-
使用Spring 的封装的MailSender
2010-11-29 22:24 6733使用Spring 的封装的Ma ... -
有时候,SVN 上代码太多,而我们只想下载自己负责的那个部分进行修改,这时可以这样
2010-09-04 09:06 1278svn checkout <url_of_big_dir ... -
tomcat session replication on linux server.
2010-07-26 10:49 1204Specially, to turn on multicast ... -
Session lost when app. is redeployed (Solved)
2010-07-07 16:02 1271There is a workaround to this p ... -
jvm 5.0 GC 回收机制
2009-10-16 11:55 1778http://java.sun.com/docs/hotspo ... -
How to Create a Custom Annotations?
2009-10-08 11:32 1239There are a lot of documentatio ... -
simple json lib for java
2009-08-04 21:57 3228有时候为了需要将一个对象或数组转成json string 给前 ... -
在servlet 上输出图片
2008-07-30 21:38 4290public void doGet(HttpServletRe ... -
用java 对 oracle 中的 image 存取
2008-07-30 21:35 1859package data; import java.io. ... -
有关 java 的 tnameserv的link
2008-07-15 22:39 2304http://java.sun.com/j2se/1.4.2/ ... -
SOAP and JDOM
2008-06-18 21:54 2152看完上一篇 blog: Web 服务搜 ... -
Java Reflection API 运用示例
2008-05-05 15:51 2393本文节选 ... -
将系统移植到Spring
2008-04-29 11:06 1490Spring已经是一个在Apache 2.0许可下发布的基础构 ... -
动态代理一例
2008-04-28 15:33 1219在之前的一篇关于Dec ... -
使用JAVA中的动态代理实现数据库连接池
2008-04-28 13:48 1480作者通过使用JAVA中的动 ... -
Have you known enough about DBCP?
2008-04-23 12:08 2262Have you known enough about DBC ... -
AX-RPC Evolves into Simpler, More Powerful JAX-WS
2008-03-23 15:40 3559s of version 2.0, JAX-RPC has b ... -
更改 Netbeans 界面的字体大小
2008-03-22 07:29 4708学习或者使用 Netbeans 的时候, 有时候觉得界面字体很 ... -
JSF+Spring+Hibernate的实例讲解
2008-03-20 16:41 2457我一直认为jsf必定会成为MS的 Net ... -
Struts+Spring+Hibernate练习(完整)
2008-03-20 16:17 2077工具: Eclipse3.2.1、MyEclipse5 ...
相关推荐
通过运行这个示例,你可以深入了解JAXB2的工作原理,并学习如何在自己的项目中应用。 总结,JAXB2是一个强大的工具,能够简化Java应用程序与XML数据之间的交互。通过理解其核心概念和实践操作,开发者可以高效地...
<artifactId>jaxb-api</artifactId> <version>2.3.1</version> </dependency> <dependency> <groupId>com.sun.xml.bind</groupId> <artifactId>jaxb-core</artifactId> <version>2.3.0.1</version> </...
<student id="1"> <name>张三</name> <major>计算机科学</major> <grade>大二</grade> </student> <student id="2"> <name>李四</name> <major>电子信息</major> <grade>大一</grade> </student> </...
在这个例子中,`<book>`是根元素,包含了三个子元素:`<title>`、`<author>`和`<year>`。每个元素都有其特定的意义,如`<title>`代表书名,`<author>`代表作者,`<year>`代表出版年份。 XML文档还可以通过命名空间...
例如,`<title>`定义了频道或条目的标题,`<description>`提供简短的介绍,`<link>`是目标资源的URL,`<pubDate>`表示发布日期,`<author>`则是作者信息。 3. 扩展性:RSS 2.0允许通过自定义元素来扩展其功能,以...
【CXF3.0+Spring3.2 RESTFul服务(下)】 ...CXF,一个强大的开源服务框架,支持SOAP和RESTful服务,而Spring作为Java应用开发的基石,...下载提供的`WbRest1`源代码,可以进一步学习和理解这些概念,并在实际项目中应用。
<load-on-startup>1</load-on-startup> </servlet> <!-- Mapping for the CXF Servlet --> <servlet-mapping> <servlet-name>CXFServlet</servlet-name> <url-pattern>/services/*</url-pattern> </servlet-...
泛型List允许我们在List中存储特定类型的元素,如List<String>或List<Integer>,确保了添加和检索元素时的类型一致性。 3. **XML配置**:由于WebService返回的是XML格式的数据,因此在处理非简单类型如List时,需要...
Java学习之JAXB(Java Architecture for XML Binding)的学习一 ...通过深入学习和熟练掌握JAXB,可以提高开发效率,提升XML相关应用的质量。在实际项目中,JAXB是一个值得信赖的XML处理解决方案。
在本教程中,我们将深入探讨如何使用纯Java语言制作角色扮演游戏(RPG)并利用XML文件导入非玩家角色(NPC)以及实现与NPC的交互。这个项目不仅涵盖了基础的Java编程,还涉及到游戏开发中的重要概念,如数据结构、...
比如,如果你有一个父节点`<parent>`,你可以在它下面添加一个子节点`<child>`,如`<parent><child>content</child></parent>`。在编程中,可以先创建`<child>`,然后将其附加到`<parent>`节点。 通过学习和实践...
在Java开发中,XML(eXtensible Markup Language)是一种常用的数据交换格式,它具有良好的结构化和可读性。...在提供的链接中,博主Eric Xiong的博客可能更深入地探讨了JAXB的使用和实践,可以作为进一步学习的资源。
<load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Jersey Web Application</servlet-name> <url-pattern>/rest/*</url-pattern> </servlet-mapping> </web-app> ``` 将`...
文本内容则是元素内的实际数据,例如 `<element>这是文本内容</element>`。注释用于解释代码,以 `<!-- 这是一个注释 -->` 形式存在。 在"xmlDemo"中,我们可能会看到如何创建XML文档,这通常包括定义根元素和嵌套...
XML(eXtensible Markup ...通过深入学习XML,你可以掌握数据表示的灵活性,更好地进行数据交换和程序设计。这个资料包“XML初学进阶”可能包含基础教程、实战案例和相关工具的使用指南,是你提升XML技能的好助手。
在这个例子中,`<book>`是根元素,`<title>`、`<author>`和`<year>`是子元素。 2. **DOM解析器** DOM(Document Object Model)是一种将XML文档转换为内存中的树形结构的方法。Java中可以使用`javax.xml.parsers....
XML(eXtensible Markup Language)是一种用于标记数据的语言,其设计目的是传输和存储数据,而非显示数据。...通过学习这个项目,可以深入理解XML在数据管理中的作用,为将来处理更复杂的XML应用场景打下基础。
属性则用于为元素添加额外信息,例如 `<book id="1">` 中的 "id" 属性。 XML与HTML的主要区别在于,HTML主要用于展示网页内容,而XML则是为了描述数据。HTML使用预定义的标签,如 `<p>`(段落)和 `<img>`(图像)...
XML(eXtensible Markup Language)是用于存储和传输数据的一种结构化格式,它在Java编程中扮演着重要角色。本教程将深入探讨如何在Java环境中进行...通过深入学习和实践,你将能够自如地驾驭XML,提升你的编程能力。
XML(eXtensible Markup Language)是一种用于标记数据的语言,其设计目的是传输和存储数据,而非显示数据。在本文中,我们将深入探讨XML...通过深入学习和实践,你可以更有效地利用XML处理和传递数据,提高工作效率。