zoukankan      html  css  js  c++  java
  • JAXB

    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.

  • 相关阅读:
    TensorFlow进行简单的图像处理
    Python Numpy
    Python描述性统计
    对文件和文件夹操作的简单函数
    Tensorflow最简单的图像搭建识别系统
    Python大数据处理模块Pandas
    redis 小结
    datatable 和list 互转
    List集合去重的一种方法
    C#中TransactionScope的使用方法和原理
  • 原文地址:https://www.cnblogs.com/huey/p/5511725.html
Copyright © 2011-2022 走看看