Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #35224
| From | Stanimir Stamenkov <s7an10@netscape.net> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: XML |
| Date | 2016-08-07 19:04 +0300 |
| Organization | A noiseless patient Spider |
| Message-ID | <no7m5v$f24$1@dont-email.me> (permalink) |
| References | (2 earlier) <nnjlfe$spe$1@gioia.aioe.org> <kvjtpblrc7j5i3u62ee6japlm9481ajavq@4ax.com> <0176078c-ab98-4e66-ba3e-b14ee88b58e0@googlegroups.com> <nnngk6$603$1@gioia.aioe.org> <d7e3e460-1025-4670-b425-672f4196d9e2@googlegroups.com> |
Fri, 5 Aug 2016 06:07:37 -0700 (PDT), Eric Douglas:
> @XmlSeeAlso(DataFile.class)
> public class Customer extends DataRecord {
>[...]
>
> My Output:
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <DataFile>
> <DataRecord xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="customer" id="100">
> <age>29</age>
> <name>John Smith</name>
> </DataRecord>
> <DataRecord xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="customer" id="101">
> <age>30</age>
> <name>Jane Doe</name>
> </DataRecord>
> </DataFile>
>
> Do I want that whole xmlns on every record or what next to get rid of it?
That's because your Customer class is not annotated as/bound to a
top-level XML element type (it really helps understanding the XML
Schema model in this context). Try using @XmlRootElement on it:
@XmlRootElement
public class Customer extends DataRecord {
I think @XmlSeeAlso(DataFile.class) on the Customer class is
superfluous. In certain situations you may need it the other way
around:
@XmlSeeAlso(Customer.class)
public class DataRecord {
--
Stanimir
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
XML Eric Douglas <e.d.programmer@gmail.com> - 2016-07-29 13:25 -0700
Re: XML Arne Vajhøj <arne@vajhoej.dk> - 2016-07-29 19:46 -0400
Re: XML Roedy Green <inquiry@mindprod.com> - 2016-07-30 17:09 -0700
Re: XML Arne Vajhøj <arne@vajhoej.dk> - 2016-07-30 21:49 -0400
Re: XML Arne Vajhøj <arne@vajhoej.dk> - 2016-07-30 22:35 -0400
Re: XML Roedy Green <inquiry@mindprod.com> - 2016-07-31 21:39 -0700
Re: XML Eric Douglas <e.d.programmer@gmail.com> - 2016-08-01 05:19 -0700
Re: XML Arne Vajhøj <arne@vajhoej.dk> - 2016-08-01 08:51 -0400
Re: XML Eric Douglas <e.d.programmer@gmail.com> - 2016-08-05 06:07 -0700
Re: XML Eric Douglas <e.d.programmer@gmail.com> - 2016-08-05 10:17 -0700
Re: XML Stanimir Stamenkov <s7an10@netscape.net> - 2016-08-07 19:04 +0300
Re: XML Eric Douglas <e.d.programmer@gmail.com> - 2016-08-08 05:38 -0700
Re: XML Eric Douglas <e.d.programmer@gmail.com> - 2016-08-08 07:19 -0700
Re: XML Stanimir Stamenkov <s7an10@netscape.net> - 2016-08-09 23:57 +0300
Re: XML Eric Douglas <e.d.programmer@gmail.com> - 2016-08-10 05:37 -0700
Re: XML Eric Douglas <e.d.programmer@gmail.com> - 2016-08-10 10:39 -0700
Re: XML Stanimir Stamenkov <s7an10@netscape.net> - 2016-08-10 22:05 +0300
Re: XML Eric Douglas <e.d.programmer@gmail.com> - 2016-08-10 13:29 -0700
Re: XML Stanimir Stamenkov <s7an10@netscape.net> - 2016-08-11 02:18 +0300
Re: XML Eric Douglas <e.d.programmer@gmail.com> - 2016-08-11 05:15 -0700
Re: XML Eric Douglas <e.d.programmer@gmail.com> - 2016-08-11 05:50 -0700
Re: XML Eric Douglas <e.d.programmer@gmail.com> - 2016-08-11 12:24 -0700
Re: XML Arne Vajhøj <arne@vajhoej.dk> - 2016-08-13 15:38 -0400
Re: XML Eric Douglas <e.d.programmer@gmail.com> - 2016-08-16 11:49 -0700
Re: XML Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-08-16 15:57 -0400
Re: XML Eric Douglas <e.d.programmer@gmail.com> - 2016-08-16 13:20 -0700
Re: XML Arne Vajhøj <arne@vajhoej.dk> - 2016-08-16 17:04 -0400
Re: XML Arne Vajhøj <arne@vajhoej.dk> - 2016-08-16 21:37 -0400
Re: XML Eric Douglas <e.d.programmer@gmail.com> - 2016-08-17 05:22 -0700
Re: XML Eric Douglas <e.d.programmer@gmail.com> - 2016-08-17 05:21 -0700
Re: XML Arne Vajhøj <arne@vajhoej.dk> - 2016-08-16 16:13 -0400
Re: XML Eric Douglas <e.d.programmer@gmail.com> - 2016-08-16 13:22 -0700
Re: XML Arne Vajhøj <arne@vajhoej.dk> - 2016-08-16 16:53 -0400
Re: XML Eric Douglas <e.d.programmer@gmail.com> - 2016-08-16 13:32 -0700
Re: XML Arne Vajhøj <arne@vajhoej.dk> - 2016-08-16 16:47 -0400
Re: XML Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-08-16 16:59 -0400
Re: XML Arne Vajhøj <arne@vajhoej.dk> - 2016-08-01 08:46 -0400
csiph-web