--- old/src/java.xml.bind/share/classes/javax/xml/bind/annotation/XmlElements.java 2015-01-29 16:25:06.893677323 +0300 +++ new/src/java.xml.bind/share/classes/javax/xml/bind/annotation/XmlElements.java 2015-01-29 16:25:06.833677324 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -83,21 +83,21 @@ * } * * <!-- XML Representation for a List of {1,2.5} - * XML output is not wrapped using another element --> + * XML output is not wrapped using another element --> * ... - * <A> 1 </A> - * <B> 2.5 </B> + * <A> 1 </A> + * <B> 2.5 </B> * ... * - * <!-- XML Schema fragment --> - * <xs:complexType name="Foo"> - * <xs:sequence> - * <xs:choice minOccurs="0" maxOccurs="unbounded"> - * <xs:element name="A" type="xs:int"/> - * <xs:element name="B" type="xs:float"/> - * <xs:choice> - * </xs:sequence> - * </xs:complexType> + * <!-- XML Schema fragment --> + * <xs:complexType name="Foo"> + * <xs:sequence> + * <xs:choice minOccurs="0" maxOccurs="unbounded"> + * <xs:element name="A" type="xs:int"/> + * <xs:element name="B" type="xs:float"/> + * <xs:choice> + * </xs:sequence> + * </xs:complexType> * * * @@ -115,19 +115,19 @@ * public List items; * } * - * <!-- XML Schema fragment --> - * <xs:complexType name="Foo"> - * <xs:sequence> - * <xs:element name="bar"> - * <xs:complexType> - * <xs:choice minOccurs="0" maxOccurs="unbounded"> - * <xs:element name="A" type="xs:int"/> - * <xs:element name="B" type="xs:float"/> - * </xs:choice> - * </xs:complexType> - * </xs:element> - * </xs:sequence> - * </xs:complexType> + * <!-- XML Schema fragment --> + * <xs:complexType name="Foo"> + * <xs:sequence> + * <xs:element name="bar"> + * <xs:complexType> + * <xs:choice minOccurs="0" maxOccurs="unbounded"> + * <xs:element name="A" type="xs:int"/> + * <xs:element name="B" type="xs:float"/> + * </xs:choice> + * </xs:complexType> + * </xs:element> + * </xs:sequence> + * </xs:complexType> * * *

Example 3: Change element name based on type using an adapter. @@ -146,19 +146,19 @@ * @XmlType(name="PX") class PX extends P {...} * @XmlType(name="PY") class PY extends P {...} * - * <!-- XML Schema fragment --> - * <xs:complexType name="Foo"> - * <xs:sequence> - * <xs:element name="bar"> - * <xs:complexType> - * <xs:choice minOccurs="0" maxOccurs="unbounded"> - * <xs:element name="A" type="PX"/> - * <xs:element name="B" type="PY"/> - * </xs:choice> - * </xs:complexType> - * </xs:element> - * </xs:sequence> - * </xs:complexType> + * <!-- XML Schema fragment --> + * <xs:complexType name="Foo"> + * <xs:sequence> + * <xs:element name="bar"> + * <xs:complexType> + * <xs:choice minOccurs="0" maxOccurs="unbounded"> + * <xs:element name="A" type="PX"/> + * <xs:element name="B" type="PY"/> + * </xs:choice> + * </xs:complexType> + * </xs:element> + * </xs:sequence> + * </xs:complexType> * * * @author