How to use Castor generated java classes when XML schema contains many nested groups

Discussion in 'Java' started by Lurker, Dec 22, 2006.

  1. Lurker

    Lurker Guest

    I've run the Castro code generator on a large and complicated XML
    Schema (xsd) containing many nested grouping models (choice within
    sequence within sequence within choice, etc.). The resulting code
    contains many "intermediate" classes such (assuming a class named
    Abst.java) AbstSequence.java, AbstSequenceSequence.java,
    AbstSequenceSequenceSequenceChoiceSequence.java, etc., etc.

    Is this normal?!? Am I doing something wrong? How do I use these
    classes to unmarshal the data in my XML. Can I configure things so
    that these classes don't show up at all? I thought of somehow
    eliminating the grouping models from my schema altogether, but I don't
    know how to do that, or if that is even possible or makes sense.

    FYI, in my app I will never be marshalling data into XML. I've got
    many thousands of valid, well-formed XML instance files that I only
    need to read (i.e., unmarshal).

    Any help appreciated.
     
    Lurker, Dec 22, 2006
    #1
    1. Advertising

  2. Lurker

    Lurker Guest

    Sorry for the typo in the first sentence!! Castor, not Castro!

    Lurker wrote:
    > I've run the Castro code generator on a large and complicated XML
    > Schema (xsd) containing many nested grouping models (choice within
    > sequence within sequence within choice, etc.). The resulting code
    > contains many "intermediate" classes such (assuming a class named
    > Abst.java) AbstSequence.java, AbstSequenceSequence.java,
    > AbstSequenceSequenceSequenceChoiceSequence.java, etc., etc.
    >
    > Is this normal?!? Am I doing something wrong? How do I use these
    > classes to unmarshal the data in my XML. Can I configure things so
    > that these classes don't show up at all? I thought of somehow
    > eliminating the grouping models from my schema altogether, but I don't
    > know how to do that, or if that is even possible or makes sense.
    >
    > FYI, in my app I will never be marshalling data into XML. I've got
    > many thousands of valid, well-formed XML instance files that I only
    > need to read (i.e., unmarshal).
    >
    > Any help appreciated.
     
    Lurker, Dec 22, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Petra Hübner
    Replies:
    0
    Views:
    462
    Petra Hübner
    Feb 16, 2004
  2. Anna
    Replies:
    0
    Views:
    612
  3. Kannan
    Replies:
    0
    Views:
    555
    Kannan
    Mar 11, 2005
  4. Sam Hwang
    Replies:
    0
    Views:
    634
    Sam Hwang
    Apr 26, 2005
  5. Markus
    Replies:
    1
    Views:
    1,637
    Markus
    Nov 23, 2005
Loading...

Share This Page