< prev index next >

src/java.xml.bind/share/classes/javax/xml/bind/annotation/XmlList.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2005, 2013, 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 --- 1,7 ---- /* ! * Copyright (c) 2005, 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
*** 51,91 **** * * <pre> * @XmlRootElement * class Foo { * @XmlElement ! * List&lt;String> data; * } * </pre> * * would produce XML like this: * * <pre> ! * &lt;foo> ! * &lt;data>abc</data> ! * &lt;data>def</data> ! * &lt;/foo> * </pre> * * @XmlList annotation, on the other hand, allows multiple values to be * represented as whitespace-separated tokens in a single element. For example, * * <pre> * @XmlRootElement * class Foo { * @XmlElement * @XmlList ! * List&lt;String> data; * } * </pre> * * the above code will produce XML like this: * * <pre> ! * &lt;foo> ! * &lt;data>abc def</data> ! * &lt;/foo> * </pre> * * <p>This annotation can be used with the following annotations: * {@link XmlElement}, * {@link XmlAttribute}, --- 51,91 ---- * * <pre> * @XmlRootElement * class Foo { * @XmlElement ! * List&lt;String&gt; data; * } * </pre> * * would produce XML like this: * * <pre> ! * &lt;foo&gt; ! * &lt;data&gt;abc&lt;/data&gt; ! * &lt;data&gt;def&lt;/data&gt; ! * &lt;/foo&gt; * </pre> * * @XmlList annotation, on the other hand, allows multiple values to be * represented as whitespace-separated tokens in a single element. For example, * * <pre> * @XmlRootElement * class Foo { * @XmlElement * @XmlList ! * List&lt;String&gt; data; * } * </pre> * * the above code will produce XML like this: * * <pre> ! * &lt;foo&gt; ! * &lt;data&gt;abc def&lt;/data&gt; ! * &lt;/foo&gt; * </pre> * * <p>This annotation can be used with the following annotations: * {@link XmlElement}, * {@link XmlAttribute},
< prev index next >