JAXB - Annotations, Annotations for the Schema: XmlSchema
This annotation can only be used with a package. It defines parameters that are derived from the xsd:schema element. It must be written on a file package-info.java situated in the package. Below is an example, specifying the namespace and elementFormDefault elements.
@javax.xml.bind.annotation.XmlSchema(
namespace = "http://www.laune.at/hospital",
elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package hospital;
This annotation is equivalent to an xs:schema element
<xs:schema elementFormDefault="qualified"
targetNamespace="http://www.laune.at/hospital"
xmlns:tns="http://www.laune.at/hospital"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
version="1.0" >
For defining namespace prefixes you use the xmlns element of the XmlSchema annotation. It contains an array of XmlNs annotations, each of which contains a prefix and anamespaceURI element. The previous example is extended with a namespace definition for the prefix med:
@javax.xml.bind.annotation.XmlSchema(
namespace = "http://www.laune.at/hospital",
xmlns = { @javax.xml.bind.annotation.XmlNs( prefix = "med",
namespaceURI = "http://www.laune.at/med" ) },
elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package hospital;
This corresponds to using xmlns:med="http://www.laune.at/med" as an attribute in the xs:schema element.
JAXB - Annotations, Annotations for the Schema: XmlSchema的更多相关文章
- JAXB - Annotations, Annotations for Enums: XmlEnum, XmlEnumValue
An enum type is annotated with XmlEnum. It has an optional element value of type java.lang.Class whi ...
- How Do Annotations Work in Java?--转
原文地址:https://dzone.com/articles/how-annotations-work-java Annotations have been a very important par ...
- ABAP CDS - Annotations 注解
Syntax ... annotation[.annotation1[.annotation2]][:value] ... Effect Annotation that can be specifi ...
- Table of Contents - JAXB
Getting Started Hello World Hello World with Namespace xjc - 将 XML Schema 编译成 Java 类 wsimport: 编译 WS ...
- cxf 报错:java.lang.NoSuchMethodError: org.apache.ws.commons.schema.XmlSchemaCollection.read(Lorg/w3c/dom/Document;Ljava/lang/String;)
由于没有仔细查看官方提供的文档,由jdk版本不一致导致的出错: http://cxf.apache.org/cxf-316-release-notes.html 自己使用的是jdk1.8. 报Exce ...
- C#实体类生成XML与XML Schema文档
一.实体类生成XML private void CreateXML() { Type[] objType = DBEntityRegst(); foreach (var item in objType ...
- Domain Driven Design and Development In Practice--转载
原文地址:http://www.infoq.com/articles/ddd-in-practice Background Domain Driven Design (DDD) is about ma ...
- opencron
opencron 是强大的管理linux crontab任务的系统,基于JAVA开发 http://github.com/wolfboys/opencron 一个功能完善真正通用的linux定时任务调 ...
- Angular 个人深究(一)【Angular中的Typescript 装饰器】
Angular 个人深究[Angular中的Typescript 装饰器] 最近进入一个新的前端项目,为了能够更好地了解Angular框架,想到要研究底层代码. 注:本人前端小白一枚,文章旨在记录自己 ...
随机推荐
- java条件选择学习
boolean类型用于声明布尔型变量,只能是true或false中的一个 boolean lightOn = true; 一个简单的数学学习工具: public class Main { public ...
- 一个简单的创建圆角图像的UIImage扩展实现
- (UIImage *)roundedCornerImageWithCornerRadius:(CGFloat)cornerRadius { CGFloat w = self.size.width; ...
- IE6完美解决fixed方法
ie6对position:fixed不支持,网上有很多解决方法,有的在ie6,ie7上调试成功后,在ie8上又不好使,div层还是跟随滚动条浮 动:以下总结方法,在ie6,ie7,ie8上都调试成功, ...
- 高效使用Bitmaps(一) 大Bitmap的加载
转载:http://my.oschina.net/rengwuxian/blog/182885 高效使用Bitmaps有什么好处? 我们常常提到的“Android程序优化”,通常指的是性能和内存的优化 ...
- Oracle- 正则表达式查询
发现Oracle支持正则表达式.先收藏. ORACLE中的支持正则表达式的函数主要有下面四个:1,REGEXP_LIKE :与LIKE的功能相似2,REGEXP_INSTR :与INSTR的功能相似3 ...
- UVa 10465 Homer Simpson (枚举)
10465 - Homer Simpson Time limit: 3.000 seconds http://uva.onlinejudge.org/index.php?option=com_onli ...
- C# 通用数据访问类(SqlHelper)
[转]C# 通用数据访问类(SqlHelper) 注:本文转自http://www.tzwhx.com/newOperate/html/3/31/312/13080.htmlVisual C# 动态操 ...
- ECSHOP在线手册布局参考图--商品详情页 goods.dwt
A.购物车 1,设置方法 程序自动读取购物车的商品数量 2,代码相关 cart.lbi 中 {insert_scripts files='transport.js'} <div clas ...
- IOS开发常用技术网站
IOS常用网站: 1.http://www.cocoachina.com 2.http://oschina.net 3.http://code4app.com
- centos 卸载自带的 java
一般情况下,我们都要将linux自带的OPENJDK卸载掉,然后安装SUN的JDK 首先:查看Linux自带的JDK是否已安装 <1># java -version ...