users@jaxb.java.net

Why JAXB do like this

From: Denis <java2xp_at_gmail.com>
Date: Wed, 29 Aug 2007 11:30:15 +0300

Hi,

It is interesting: I have xsd with root element politikensforlag which
looks like:

    <xsd:element name="politikensforlag"
        type="PolicyIdenticalPublisher" />

    <xsd:complexType name="PolicyIdenticalPublisher">
        <xsd:sequence minOccurs="1" maxOccurs="unbounded">
            <xsd:element name="item" type="Item"/>
        </xsd:sequence>
    </xsd:complexType>

........................

Than JAXB generates me
   /**
     * Create an instance of {_at_link PolicyIdenticalPublisher }
     *
     */
    public PolicyIdenticalPublisher createPolicyIdenticalPublisher() {
        return new PolicyIdenticalPublisher();
    }

    /**
     * Create an instance of {_at_link JAXBElement }{_at_code <}{_at_link
PolicyIdenticalPublisher }{_at_code >}}
     *
     */
    @XmlElementDecl(namespace = "", name = "politikensforlag")
    public JAXBElement<PolicyIdenticalPublisher>
createPolitikensforlag(PolicyIdenticalPublisher value) {
        return new
JAXBElement<PolicyIdenticalPublisher>(_Politikensforlag_QNAME,
PolicyIdenticalPublisher.class, null, value);
    }


Than after invoking
u.unmarshal(xsdf_file);
returns me JAXBElement<PolicyIdenticalPublisher>, but not
PolicyIdenticalPublisher. Why?