Hi Christian,

You will need just one SubPackage class for this, however you will need
the write methods on it to accomplish what you need.

Have you considered writing an XML Schema for your XML file and using
the Castor Source Generator to produce the classes for you?

Andy.

-----Original Message-----
From: Christian Richter [mailto:[EMAIL PROTECTED] 
Sent: 27 April 2005 16:48
To: [email protected]
Subject: [castor-user] how to map composite patterns with castor?

To Whom It May Concern,

I want to use Castor for DataBinding and have a problem with the
mapping. I don't know the depth of the Source-XML-File. The following
part is a sample XML-File which should illustrate that problem:

..
<package>
  ...
  <subpackage>
    ...
    <subpackage>
      ...
      <subpackage>
        ...
        ...
        ...
        ...
      </subpackage>
    </subpackage>
  </subpackage>
</package>

A subpackage could be part of other subpackages. I read that for every
node in a XML-File a Java-Class must exist. But as you can see in the
example above I can't know the number of nodes! How can I fix that
problem?

Thank you for helping!

Regards,
  Christian Richter
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193



The information in this message is confidential and may be legally privileged. 
It may not be disclosed to, or used by, anyone other than the addressee. If you 
receive this message in error, please advise us immediately.  Internet emails 
are not necessarily secure. CODA does not accept responsibility for changes to 
any email which occur after the email has been sent. Attachments to this email 
may contain software viruses, which could damage your systems. CODA has checked 
the attachments for viruses before sending, but you should virus-check them 
before opening.  

Reply via email to