Christian,

Simply create a Subpackage class that can contain another Subpackage instance, eg:

public class Subpackage {

    private Subpackage _subpackage = null;

    public Subpackage() {
       ...
    }

    public Subpackage getSubpackage() {
        return _subpackage;
    }

    public void setSubpackage(Subpackage subpackage) {
        _subpackage = subpackage;
    }

    ...
}

--Keith


Christian Richter wrote:
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





Reply via email to