< prev index next >
src/java.xml.bind/share/classes/javax/xml/bind/annotation/XmlRootElement.java
Print this page
@@ -1,7 +1,7 @@
/*
- * 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -52,11 +52,11 @@
* as XML element in an XML document.
*
* <p> This annotation can be used with the following annotations:
* {@link XmlType}, {@link XmlEnum}, {@link XmlAccessorType},
* {@link XmlAccessorOrder}.
- * <p>
+ * </p>
* <p>
* <b>Example 1: </b> Associate an element with XML Schema type
* <pre>
* // Example: Code fragment
@@ -72,30 +72,30 @@
* //Example: Code fragment corresponding to XML output
* marshal( new Point(3,5), System.out);
* </pre>
*
* <pre>
- * <!-- Example: XML output -->
- * <point>
- * <x> 3 </x>
- * <y> 5 </y>
- * </point>
+ * <!-- Example: XML output -->
+ * <point>
+ * <x> 3 </x>
+ * <y> 5 </y>
+ * </point>
* </pre>
*
* The annotation causes an global element declaration to be produced
* in the schema. The global element declaration is associated with
* the XML schema type to which the class is mapped.
*
* <pre>
- * <!-- Example: XML schema definition -->
- * <xs:element name="point" type="point"/>
- * <xs:complexType name="point">
- * <xs:sequence>
- * <xs:element name="x" type="xs:int"/>
- * <xs:element name="y" type="xs:int"/>
- * </xs:sequence>
- * </xs:complexType>
+ * <!-- Example: XML schema definition -->
+ * <xs:element name="point" type="point"/>
+ * <xs:complexType name="point">
+ * <xs:sequence>
+ * <xs:element name="x" type="xs:int"/>
+ * <xs:element name="y" type="xs:int"/>
+ * </xs:sequence>
+ * </xs:complexType>
* </pre>
*
* <p>
*
* <b>Example 2: Orthogonality to type inheritance </b>
@@ -112,29 +112,29 @@
* }
*
* //Example: Code fragment corresponding to XML output *
* marshal( new Point3D(3,5,0), System.out );
*
- * <!-- Example: XML output -->
- * <!-- The element name is point3D not point -->
- * <point3D>
- * <x>3</x>
- * <y>5</y>
- * <z>0</z>
- * </point3D>
- *
- * <!-- Example: XML schema definition -->
- * <xs:element name="point3D" type="point3D"/>
- * <xs:complexType name="point3D">
- * <xs:complexContent>
- * <xs:extension base="point">
- * <xs:sequence>
- * <xs:element name="z" type="xs:int"/>
- * </xs:sequence>
- * </xs:extension>
- * </xs:complexContent>
- * </xs:complexType>
+ * <!-- Example: XML output -->
+ * <!-- The element name is point3D not point -->
+ * <point3D>
+ * <x>3</x>
+ * <y>5</y>
+ * <z>0</z>
+ * </point3D>
+ *
+ * <!-- Example: XML schema definition -->
+ * <xs:element name="point3D" type="point3D"/>
+ * <xs:complexType name="point3D">
+ * <xs:complexContent>
+ * <xs:extension base="point">
+ * <xs:sequence>
+ * <xs:element name="z" type="xs:int"/>
+ * </xs:sequence>
+ * </xs:extension>
+ * </xs:complexContent>
+ * </xs:complexType>
* </pre>
*
* <b>Example 3: </b> Associate a global element with XML Schema type
* to which the class is mapped.
* <pre>
@@ -143,17 +143,17 @@
* public class USPrice {
* @XmlElement
* public java.math.BigDecimal price;
* }
*
- * <!-- Example: XML schema definition -->
- * <xs:element name="PriceElement" type="USPrice"/>
- * <xs:complexType name="USPrice">
- * <xs:sequence>
- * <xs:element name="price" type="xs:decimal"/>
- * </sequence>
- * </xs:complexType>
+ * <!-- Example: XML schema definition -->
+ * <xs:element name="PriceElement" type="USPrice"/>
+ * <xs:complexType name="USPrice">
+ * <xs:sequence>
+ * <xs:element name="price" type="xs:decimal"/>
+ * </sequence>
+ * </xs:complexType>
* </pre>
*
* @author Sekhar Vajjhala, Sun Microsystems, Inc.
* @since 1.6, JAXB 2.0
*/
< prev index next >