Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

XML Annotation related to schema attribute processContents="skip".

802245Jan 7 2008
Hello all,

I have a XML schema (.xsd) having one element like:
<xs:element name="XMLTest" minOccurs="1" maxOccurs="1">

   <xs:complexType>

      <xs:sequence>

         <xs:any minOccurs="0" maxOccurs="1" processContents="skip"></xs:any>

      </xs:sequence>

   </xs:complexType>

</xs:element>
I have specified attribute processContent="skip" for element, because I don't want any kind of process on this element.

now, when I create classes from this schema file using "XJC" tool It don't add any annotation related to processContent="skip" attribute in my class.

Because of this whenever any operation performed on instance of schema class it's content will be processed (when I don't want them to be processed). It means this class is processed like any other normal class.

Can any one please suggest me

- how can I get same effect as processContent="skip" attribute, using javax.xml.bind.

- or any other suggestions or way for doing same.

-----------------
Thanks a lot in advance,
typurohit
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 4 2008
Added on Jan 7 2008
0 comments
152 views