IT is not required to have java objects for every element. There is a
'location' attribute that you can associate with the bind-xml rul in the
mapping. Poke around the castor website/documentation. It kind of works
kewl.
Thanks
Sudhi
-----Original Message-----
From: Bryan LaPlante [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 10, 2004 7:36 AM
To: [EMAIL PROTECTED]
Subject: Re: [castor-user] [XML] Ignoring XML tags
Would this work for you.
<!ELEMENT ROOT (CONTAINER*)>
<!ELEMENT CONTAINER (SOMEOBJECT)>
<!ELEMENT SOMEOBJECT (#CDATA)>
Converting this to xsd and then generating your Java classes from that
will produce a ROOT element that has a one to many with CONTAINER and a
container that has a required OBJECT where the object contains content.
Your ROOT class will have an ArrayList probably called CONTAINERList and
the appropriate add, enumerate and clear methods.
Bryan LaPlante
-----Original Message-----
From: David Leangen [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 10, 2004 12:38 AM
To: [EMAIL PROTECTED]
Subject: [castor-user] [XML] Ignoring XML tags
Is it NECESSARY to bind a Java object to EVERY XML tag?
In particular, if I have some type of XML:
<root>
<containerList>
<container>
<object>something useful</object>
<container>
...
</containerList>
</root>
And if all I'm interested in is building a java.util.List of the objects
above, pretty much ignoring all the other elements, how would I go about
doing that without having to create Java objects for <containerList> and
<container>?
Thanks!
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user