jaxb use of AnyType

J

jamest

I'm new to jaxb and am using the 1-5 version to output a content tree.
I've got several values of type 'org.w3._2001.xmlschema.AnyType'. When
the file is output I would like to see in the output element something
like:

<value xsi:type="SLIST_PQ">
....
</value>

where the type of object in the AnyType content list is specified. Can
anyone tell me if it's possible to specify this in java code? Right now
all I get is"

<value>
....
</value>

The java code looks like:

AnyType sequenceValue = new
org.w3._2001.xmlschema.ObjectFactory().createAnyType();
SLISTPQ sListPq = factory.createSLISTPQ();
....
sequenceValue.getContent().add(sListPq);

The schema defines the value element as:
<xsd:element name="value" minOccurs="0" maxOccurs="1"
type="xsd:anyType"/>

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top