226 * }
227 * </pre>
228 * then the following document will unmarshal like this:
229 * <pre>
230 * <foo>
231 * <unknown />
232 * <foo />
233 * </foo>
234 *
235 * Foo foo = unmarshal();
236 * // 1 for 'unknown', another for 'foo'
237 * assert foo.others.length==2;
238 * // 'unknown' unmarshals to a DOM element
239 * assert foo.others[0] instanceof Element;
240 * // because of lax=true, the 'foo' element eagerly
241 * // unmarshals to a Foo object.
242 * assert foo.others[1] instanceof Foo;
243 * </pre>
244 *
245 * @author Kohsuke Kawaguchi
246 * @since JAXB2.0
247 */
248 @Retention(RUNTIME)
249 @Target({FIELD,METHOD})
250 public @interface XmlAnyElement {
251
252 /**
253 * Controls the unmarshaller behavior when it sees elements
254 * known to the current {@link JAXBContext}.
255 *
256 * <h3>When false</h3>
257 * <p>
258 * If false, all the elements that match the property will be unmarshalled
259 * to DOM, and the property will only contain DOM elements.
260 *
261 * <h3>When true</h3>
262 * <p>
263 * If true, when an element matches a property marked with {@link XmlAnyElement}
264 * is known to {@link JAXBContext} (for example, there's a class with
265 * {@link XmlRootElement} that has the same tag name, or there's
266 * {@link XmlElementDecl} that has the same tag name),
|
226 * }
227 * </pre>
228 * then the following document will unmarshal like this:
229 * <pre>
230 * <foo>
231 * <unknown />
232 * <foo />
233 * </foo>
234 *
235 * Foo foo = unmarshal();
236 * // 1 for 'unknown', another for 'foo'
237 * assert foo.others.length==2;
238 * // 'unknown' unmarshals to a DOM element
239 * assert foo.others[0] instanceof Element;
240 * // because of lax=true, the 'foo' element eagerly
241 * // unmarshals to a Foo object.
242 * assert foo.others[1] instanceof Foo;
243 * </pre>
244 *
245 * @author Kohsuke Kawaguchi
246 * @since 1.6, JAXB 2.0
247 */
248 @Retention(RUNTIME)
249 @Target({FIELD,METHOD})
250 public @interface XmlAnyElement {
251
252 /**
253 * Controls the unmarshaller behavior when it sees elements
254 * known to the current {@link JAXBContext}.
255 *
256 * <h3>When false</h3>
257 * <p>
258 * If false, all the elements that match the property will be unmarshalled
259 * to DOM, and the property will only contain DOM elements.
260 *
261 * <h3>When true</h3>
262 * <p>
263 * If true, when an element matches a property marked with {@link XmlAnyElement}
264 * is known to {@link JAXBContext} (for example, there's a class with
265 * {@link XmlRootElement} that has the same tag name, or there's
266 * {@link XmlElementDecl} that has the same tag name),
|